per line comments display

This commit is contained in:
Dmitriy Zaporozhets 2012-01-10 22:08:46 +02:00
parent c66bc99fb7
commit 9da4d06a87
7 changed files with 78 additions and 2 deletions

View file

@ -166,7 +166,11 @@ class Project < ActiveRecord::Base
end
def commit_notes(commit)
notes.where(:noteable_id => commit.id, :noteable_type => "Commit")
notes.where(:noteable_id => commit.id, :noteable_type => "Commit", :line_code => nil)
end
def commit_line_notes(commit)
notes.where(:noteable_id => commit.id, :noteable_type => "Commit").where("line_code not null")
end
def has_commits?