Skip to content
代码片段 群组 项目
提交 473b04a9 编辑于 作者: 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>
上级 a9924ee4
No related branches found
No related tags found
无相关合并请求
......@@ -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:
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册