blob: c6e32be245d4bac0b3a125340386475440290009 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# frozen_string_literal: true
module Issues
module LookAheadPreloads
extend ActiveSupport::Concern
prepended do
include ::LooksAhead
end
private
def unconditional_includes
[
{
project: [:project_feature, :group]
},
:author
]
end
def preloads
{
alert_management_alert: [:alert_management_alert],
assignees: [:assignees],
participants: Issue.participant_includes,
timelogs: [:timelogs],
customer_relations_contacts: { customer_relations_contacts: [:group] },
escalation_status: [:incident_management_issuable_escalation_status]
}
end
end
end
Issues::LookAheadPreloads.prepend_mod
|