diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-06 11:39:51 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-06 11:39:51 +0100 |
commit | 4d177d46d95d77e06c88241c3bf809945fbd3a92 (patch) | |
tree | 9c751640fcda804d0f63ad70dbf4d3c989973e30 | |
parent | 5384df5589c7adccff845e943ce594f556397e77 (diff) | |
download | rails-4d177d46d95d77e06c88241c3bf809945fbd3a92.tar.gz rails-4d177d46d95d77e06c88241c3bf809945fbd3a92.tar.bz2 rails-4d177d46d95d77e06c88241c3bf809945fbd3a92.zip |
Routes should not swallow all NameErrors [#3862 status:resolved].
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index c49ac70562..dcf98b729b 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -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 |