summaryrefslogtreecommitdiff
path: root/app/models/concerns/issuable.rb
diff options
context:
space:
mode:
authorAlexander Koval <al3xander.koval@gmail.com>2019-02-27 10:28:53 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-02-27 10:28:53 +0000
commit1874aa9a3b3151ece76030d620017425e3cafc2f (patch)
tree3802218f22d4d93a721339d5cd7fcd1e18d8baf5 /app/models/concerns/issuable.rb
parentd2336e026903f9ff81362fba034c02d95ac3fe81 (diff)
downloadgitlab-ce-1874aa9a3b3151ece76030d620017425e3cafc2f.tar.gz
Reduce code duplication
Move logic of obtaining Issuable data to separate method
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r--app/models/concerns/issuable.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 429a63f83cc..670103bc3f3 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -28,7 +28,7 @@ module Issuable
# This object is used to gather issuable meta data for displaying
# upvotes, downvotes, notes and closing merge requests count for issues and merge requests
# lists avoiding n+1 queries and improving performance.
- IssuableMeta = Struct.new(:upvotes, :downvotes, :notes_count, :merge_requests_count)
+ IssuableMeta = Struct.new(:upvotes, :downvotes, :user_notes_count, :merge_requests_count)
included do
cache_markdown_field :title, pipeline: :single_line
@@ -36,8 +36,8 @@ module Issuable
redact_field :description
- belongs_to :author, class_name: "User"
- belongs_to :updated_by, class_name: "User"
+ belongs_to :author, class_name: 'User'
+ belongs_to :updated_by, class_name: 'User'
belongs_to :last_edited_by, class_name: 'User'
belongs_to :milestone