summaryrefslogtreecommitdiff
path: root/app/models/network
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-05-30 18:22:48 +0000
committerRobert Speicher <robert@gitlab.com>2016-05-30 18:22:48 +0000
commitde20bd5b31715f096db3fb0155c82b0eea992b6c (patch)
tree1eaaca4fe32df60f6e813a1399a1959fb9481502 /app/models/network
parentb05981f019581aab030fbacb7cd7bf5506d12266 (diff)
parentfdcb7e36859ed6cf2ce5cb1117391d791213e80e (diff)
downloadgitlab-ce-de20bd5b31715f096db3fb0155c82b0eea992b6c.tar.gz
Merge branch 'rubocop/enable-space-before-comma-cop' into 'master'
Enable Style/SpaceBeforeComma rubocop cop No spaces before commas. See #17478 See merge request !4360
Diffstat (limited to 'app/models/network')
-rw-r--r--app/models/network/graph.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb
index 32d0962185b..1ac37e0307f 100644
--- a/app/models/network/graph.rb
+++ b/app/models/network/graph.rb
@@ -22,9 +22,16 @@ module Network
def collect_notes
h = Hash.new(0)
- @project.notes.where('noteable_type = ?' ,"Commit").group('notes.commit_id').select('notes.commit_id, count(notes.id) as note_count').each do |item|
- h[item.commit_id] = item.note_count.to_i
- end
+
+ @project
+ .notes
+ .where('noteable_type = ?', 'Commit')
+ .group('notes.commit_id')
+ .select('notes.commit_id, count(notes.id) as note_count')
+ .each do |item|
+ h[item.commit_id] = item.note_count.to_i
+ end
+
h
end