summaryrefslogtreecommitdiff
path: root/app/helpers/graph_helper.rb
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-04-24 15:06:31 +0000
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-04-24 15:06:31 +0000
commit63b58b9491badf4fe5fa79a32c6ad77be2bf3c25 (patch)
tree7dccb301891f4d9336a2dafe1c902b273d33b6a3 /app/helpers/graph_helper.rb
parent75fbdc40eb6c46a5a1a5d95a314dad0b3eeda299 (diff)
downloadgitlab-ce-63b58b9491badf4fe5fa79a32c6ad77be2bf3c25.tar.gz
Reducing database access.
Diffstat (limited to 'app/helpers/graph_helper.rb')
-rw-r--r--app/helpers/graph_helper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb
index ca7d823a45a..71a07d6cad1 100644
--- a/app/helpers/graph_helper.rb
+++ b/app/helpers/graph_helper.rb
@@ -4,8 +4,7 @@ module GraphHelper
refs += commit.refs.collect{|r|r.name}.join(" ") if commit.refs
# append note count
- notes = @project.notes.for_commit_id(commit.id)
- refs += "[#{notes.count}]" if notes.any?
+ refs += "[#{@graph.notes[commit.id]}]" if @graph.notes[commit.id] > 0
refs
end