Download all attachments in a journal (#35462).

Patch by Takenori TAKAKI.


git-svn-id: http://svn.redmine.org/redmine/trunk@21292 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2021-11-22 08:42:44 +00:00
parent d72ae9b32b
commit 0a5ef25e87
7 changed files with 46 additions and 3 deletions

View File

@@ -225,7 +225,7 @@ class AttachmentsController < ApplicationController
rescue
nil
end
unless klass && klass.reflect_on_association(:attachments)
unless klass && (klass.reflect_on_association(:attachments) || klass.method_defined?(:attachments))
render_404
return
end