From 02a9401d788425b02b7abc65793dff211dcff9c4 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 26 May 2014 17:19:54 -0700 Subject: stop hardcoding path_parameters and get it from the request --- actionpack/lib/action_controller/metal.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 70ca99f01c..a3ad5888de 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -221,7 +221,8 @@ module ActionController # Makes the controller a Rack endpoint that runs the action in the given # +env+'s +action_dispatch.request.path_parameters+ key. def self.call(env) - action(env['action_dispatch.request.path_parameters'][:action]).call(env) + req = ActionDispatch::Request.new env + action(req.path_parameters[:action]).call(env) end # Returns a Rack endpoint for the given action name. -- cgit v1.2.3