git-svn-id: http://svn.redmine.org/redmine/trunk@19863 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/4.2.0
@@ -218,7 +218,12 @@ class AttachmentsController < ApplicationController | |||
end | |||
def find_container | |||
klass = params[:object_type].to_s.singularize.classify.constantize rescue nil | |||
klass = | |||
begin | |||
params[:object_type].to_s.singularize.classify.constantize | |||
rescue | |||
nil | |||
end | |||
unless klass && klass.reflect_on_association(:attachments) | |||
render_404 | |||
return |