diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-01 22:48:42 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-01 22:48:42 -0600 |
commit | 2fbd6f46fd00a334119f1a25394046963831ce3e (patch) | |
tree | 1328ee8ade328a129df47ddae815bd5a0c6dab5b /actionpack/lib/action_dispatch/routing/route_set.rb | |
parent | 7fe19d415ab80727d685c163d7a0413ca6bfe585 (diff) | |
download | rails-2fbd6f46fd00a334119f1a25394046963831ce3e.tar.gz rails-2fbd6f46fd00a334119f1a25394046963831ce3e.tar.bz2 rails-2fbd6f46fd00a334119f1a25394046963831ce3e.zip |
Simply track controller namespaces instead of a complete list of
possible controllers to route to
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 18e18c5820..c2f6531a74 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -27,11 +27,13 @@ module ActionDispatch end end + unless controller = controller(params) + return [417, {}, []] + end + if env['action_controller.recognize'] - controller(params) [200, {}, params] else - controller = controller(params) controller.action(params[:action]).call(env) end end @@ -42,8 +44,8 @@ module ActionDispatch controller = "#{params[:controller].camelize}Controller" ActiveSupport::Inflector.constantize(controller) end - rescue NameError => e - raise ActionController::RoutingError, e.message + rescue NameError + nil end def merge_default_action!(params) |