Routes should not swallow all NameErrors [#3862 status:resolved].

This commit is contained in:
José Valim 2010-02-06 11:39:51 +01:00
parent 5384df5589
commit 4d177d46d9
1 changed files with 2 additions and 1 deletions

View File

@ -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