Patch #37057 » 0001-Attachment-activity-provider-sql-optimization.patch
| app/models/attachment.rb | ||
|---|---|---|
|
:scope =>
|
||
|
proc do
|
||
|
select("#{Attachment.table_name}.*").
|
||
|
where(container_type: ['Version', 'Project']).
|
||
|
joins(
|
||
|
"LEFT JOIN #{Version.table_name} " \
|
||
|
"ON #{Attachment.table_name}.container_type='Version' " \
|
||