Commit c7a1779b authored by Nihad Abbasov's avatar Nihad Abbasov

.map -> .pluck

parent 841e4fbd
......@@ -11,7 +11,7 @@ class Milestone < ActiveRecord::Base
end
def participants
User.where(id: issues.map(&:assignee_id))
User.where(id: issues.pluck(:assignee_id))
end
def percent_complete
......
......@@ -147,7 +147,7 @@ class Project < ActiveRecord::Base
end
def wiki_notes
Note.where(noteable_id: wikis.map(&:id), noteable_type: 'Wiki', project_id: self.id)
Note.where(noteable_id: wikis.pluck(:id), noteable_type: 'Wiki', project_id: self.id)
end
def project_id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment