.map -> .pluck
This commit is contained in:
parent
841e4fbd08
commit
c7a1779b22
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ class Milestone < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def participants
|
def participants
|
||||||
User.where(id: issues.map(&:assignee_id))
|
User.where(id: issues.pluck(:assignee_id))
|
||||||
end
|
end
|
||||||
|
|
||||||
def percent_complete
|
def percent_complete
|
||||||
|
|
|
@ -147,7 +147,7 @@ class Project < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def wiki_notes
|
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
|
end
|
||||||
|
|
||||||
def project_id
|
def project_id
|
||||||
|
|
Loading…
Add table
Reference in a new issue