Skip to content
Snippets Groups Projects
Commit 473b04a9 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

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


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent a9924ee4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
---
title: Include :author, :project, and :target in Event.with_associations
merge_request:
author:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment