aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-12-30 15:18:20 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-12-30 15:18:20 -0800
commit4080dd2f244e7c4d140f8724c2075102ea9db36e (patch)
tree7632a2535f2ea682802a341351b83ac25b956d2d /actionpack/lib/action_dispatch/http
parent87a75910640b83a677099198ccb3317d9850c204 (diff)
downloadrails-4080dd2f244e7c4d140f8724c2075102ea9db36e.tar.gz
rails-4080dd2f244e7c4d140f8724c2075102ea9db36e.tar.bz2
rails-4080dd2f244e7c4d140f8724c2075102ea9db36e.zip
stop referencing `env` in url_for
encapsulate env in the request so that we can eventually move away from the env hash
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index b15f37d7f2..d211ea2b77 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -113,6 +113,10 @@ module ActionDispatch
env['ORIGINAL_SCRIPT_NAME'.freeze]
end
+ def engine_script_name(_routes) # :nodoc:
+ env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]
+ end
+
def request_method=(request_method) #:nodoc:
if check_method(request_method)
@request_method = env["REQUEST_METHOD"] = request_method