Defect #2930 ยป attachment.patch
| attachment.rb (working copy) | ||
|---|---|---|
| 33 | 33 |
:author_key => :author_id, |
| 34 | 34 |
:find_options => {:select => "#{Attachment.table_name}.*",
|
| 35 | 35 |
:joins => "LEFT JOIN #{Version.table_name} ON #{Attachment.table_name}.container_type='Version' AND #{Version.table_name}.id = #{Attachment.table_name}.container_id " +
|
| 36 |
"LEFT JOIN #{Project.table_name} ON #{Version.table_name}.project_id = #{Project.table_name}.id"}
|
|
| 36 |
"LEFT JOIN #{Project.table_name} ON #{Version.table_name}.project_id = #{Project.table_name}.id OR ( #{Attachment.table_name}.container_type='Project' AND #{Attachment.table_name}.container_id = #{Project.table_name}.id )"}
|
|
| 37 | 37 |
|
| 38 | 38 |
acts_as_activity_provider :type => 'documents', |
| 39 | 39 |
:permission => :view_documents, |