diff options
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index 2662f170765..cf89ac5207f 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -36,10 +36,10 @@ class Event < ActiveRecord::Base scope :code_push, -> { where(action: PUSHED) } scope :in_projects, ->(projects) do - where(project_id: projects.map(&:id)).recent + where(project_id: projects).recent end - scope :with_associations, -> { includes(project: :namespace) } + scope :with_associations, -> { includes(:author, :project, project: :namespace).preload(:target) } scope :for_milestone_id, ->(milestone_id) { where(target_type: "Milestone", target_id: milestone_id) } class << self |