From 59e3b648c3191d3eaf163142f742d05a3616e0b6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 24 Aug 2015 14:01:11 -0700 Subject: 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 --- actionpack/lib/action_dispatch/routing/route_set.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'actionpack/lib') 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) -- cgit v1.2.3