Routes should not swallow all NameErrors [#3862 status:resolved].
This commit is contained in:
parent
5384df5589
commit
4d177d46d9
|
@ -44,7 +44,8 @@ module ActionDispatch
|
|||
controller = "#{params[:controller].camelize}Controller"
|
||||
ActiveSupport::Inflector.constantize(controller)
|
||||
end
|
||||
rescue NameError
|
||||
rescue NameError => e
|
||||
raise unless e.message.include?(controller)
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue