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

Don't instantiate AR objects in Event.in_projects


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e21257f7
No related branches found
No related tags found
1 merge request!1226[EE] Resolve "GroupsController#activity.json is REALLY slow due to SQL"
Loading
Loading
@@ -36,7 +36,7 @@ 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) }
Loading
Loading
---
title: Don't instantiate AR objects in Event.in_projects
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