Patch #37057 » attachment2.patch
| app/models/attachment.rb | ||
|---|---|---|
|
:scope =>
|
||
|
proc do
|
||
|
select("#{Attachment.table_name}.*").
|
||
|
where(container_type: 'Document').
|
||
|
joins(
|
||
|
"LEFT JOIN #{Document.table_name} " \
|
||
|
"ON #{Attachment.table_name}.container_type='Document' " \
|
||