aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-24 14:01:11 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-24 14:01:11 -0700
commit59e3b648c3191d3eaf163142f742d05a3616e0b6 (patch)
treefc38308c1468fb7c8d1f92fc3800733d4ad89733 /actionpack/lib
parent74020eb2557cecf4cb4ed828bce2c87826a86697 (diff)
downloadrails-59e3b648c3191d3eaf163142f742d05a3616e0b6.tar.gz
rails-59e3b648c3191d3eaf163142f742d05a3616e0b6.tar.bz2
rails-59e3b648c3191d3eaf163142f742d05a3616e0b6.zip
directly ask the request for the controller class
Now that we don't have subclasses depending on this method (they augment the request class instead of the dispatch class) we can remove this method and directly ask the request object for the controller class
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 2cbf6cef90..654eabaa96 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -28,7 +28,7 @@ module ActionDispatch
def serve(req)
params = req.path_parameters
- controller = controller_reference(req) do
+ controller = req.controller_class do
return [404, {'X-Cascade' => 'pass'}, []]
end
dispatch(controller, params[:action], req)
@@ -40,11 +40,6 @@ module ActionDispatch
end
end
- protected
- def controller_reference(req, &block)
- req.controller_class(&block)
- end
-
private
def dispatch(controller, action, req)