aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-25 14:26:48 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-25 14:26:48 -0700
commitb18f22d15c28fc5fe634928d59148c932bba4696 (patch)
tree082cbcd84dacfc506a121c8b42f4fc4a5446ae74 /actionpack/lib
parent62c013d7b18d726d0ce10c3e7a1208d5e0e7fadf (diff)
downloadrails-b18f22d15c28fc5fe634928d59148c932bba4696.tar.gz
rails-b18f22d15c28fc5fe634928d59148c932bba4696.tar.bz2
rails-b18f22d15c28fc5fe634928d59148c932bba4696.zip
pass the request object to the application
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/journey/router.rb2
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb5
2 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb
index 2ead6a4eb3..8ec223afc3 100644
--- a/actionpack/lib/action_dispatch/journey/router.rb
+++ b/actionpack/lib/action_dispatch/journey/router.rb
@@ -39,7 +39,7 @@ module ActionDispatch
req.path_parameters = set_params.merge parameters
- status, headers, body = route.app.call(req.env)
+ status, headers, body = route.app.serve(req)
if 'pass' == headers['X-Cascade']
req.script_name = script_name
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 702d998447..08a5e7c637 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -42,9 +42,8 @@ module ActionDispatch
end
end
- def call(env)
- req = @request.new(env)
- matches?(req) ? @app.call(env) : [ 404, {'X-Cascade' => 'pass'}, [] ]
+ def serve(req)
+ matches?(req) ? @app.call(req.env) : [ 404, {'X-Cascade' => 'pass'}, [] ]
ensure
req.reset_parameters
end