Commit a9924ee4 authored by Rémy Coutable's avatar Rémy Coutable

Don't instantiate AR objects in Event.in_projects

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 85349c96
......@@ -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) }
......
---
title: Don't instantiate AR objects in Event.in_projects
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