diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-26 17:19:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-26 17:19:54 -0700 |
commit | 02a9401d788425b02b7abc65793dff211dcff9c4 (patch) | |
tree | 06e9ab8c503f6ef8b09861cfe15dc33f4143ec84 /actionpack/lib | |
parent | d1012b669e33342156e3109d82e7eec8c3d457a9 (diff) | |
download | rails-02a9401d788425b02b7abc65793dff211dcff9c4.tar.gz rails-02a9401d788425b02b7abc65793dff211dcff9c4.tar.bz2 rails-02a9401d788425b02b7abc65793dff211dcff9c4.zip |
stop hardcoding path_parameters and get it from the request
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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. |