Commit c7a1779b2215b1815d43c5635e026afeed8da7f4

Authored by Nihad Abbasov
1 parent 841e4fbd

.map -> .pluck

app/models/milestone.rb
... ... @@ -11,7 +11,7 @@ class Milestone < ActiveRecord::Base
11 11 end
12 12  
13 13 def participants
14   - User.where(id: issues.map(&:assignee_id))
  14 + User.where(id: issues.pluck(:assignee_id))
15 15 end
16 16  
17 17 def percent_complete
... ...
app/models/project.rb
... ... @@ -147,7 +147,7 @@ class Project < ActiveRecord::Base
147 147 end
148 148  
149 149 def wiki_notes
150   - Note.where(noteable_id: wikis.map(&:id), noteable_type: 'Wiki', project_id: self.id)
  150 + Note.where(noteable_id: wikis.pluck(:id), noteable_type: 'Wiki', project_id: self.id)
151 151 end
152 152  
153 153 def project_id
... ...