Skip to content
Snippets Groups Projects
Commit 5d6fea1b authored by Francisco Javier López's avatar Francisco Javier López
Browse files
parent 77d190b4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -72,7 +72,7 @@ class Event < ActiveRecord::Base
# We're using preload for "push_event_payload" as otherwise the association
# is not always available (depending on the query being built).
includes(:author, :project, project: :namespace)
.preload(:push_event_payload, target: :author)
.preload(:target, :push_event_payload)
end
 
scope :for_milestone_id, ->(milestone_id) { where(target_type: "Milestone", target_id: milestone_id) }
Loading
Loading
---
title: Fix N+1 query when displaying events
merge_request:
author:
type: performance
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