Commit 473b04a9 authored by Rémy Coutable's avatar Rémy Coutable

Include :author, :project, and :target in Event.with_associations

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent a9924ee4
......@@ -39,7 +39,7 @@ class Event < ActiveRecord::Base
where(project_id: projects).recent
end
scope :with_associations, -> { includes(project: :namespace) }
scope :with_associations, -> { includes(:author, :project, :target, project: :namespace) }
scope :for_milestone_id, ->(milestone_id) { where(target_type: "Milestone", target_id: milestone_id) }
class << self
......
---
title: Include :author, :project, and :target in Event.with_associations
merge_request:
author:
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