mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Routes should not swallow all NameErrors [#3862 status:resolved].
This commit is contained in:
parent
5384df5589
commit
4d177d46d9
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue