aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/request.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-12-30 14:47:51 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-12-30 14:48:10 -0800
commit87a75910640b83a677099198ccb3317d9850c204 (patch)
tree9045169315eb1185b81d4061457672d7eb7d3078 /actionpack/lib/action_dispatch/http/request.rb
parent77a9486ba66fc873e990f275e6ae1a5b56688f6c (diff)
downloadrails-87a75910640b83a677099198ccb3317d9850c204.tar.gz
rails-87a75910640b83a677099198ccb3317d9850c204.tar.bz2
rails-87a75910640b83a677099198ccb3317d9850c204.zip
use methods on the request rather than direct hash access
this will help decouple us from using the rack env hash
Diffstat (limited to 'actionpack/lib/action_dispatch/http/request.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index 2a7bb374a5..b15f37d7f2 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -105,6 +105,14 @@ module ActionDispatch
@request_method ||= check_method(env["REQUEST_METHOD"])
end
+ def routes # :nodoc:
+ env["action_dispatch.routes".freeze]
+ end
+
+ def original_script_name # :nodoc:
+ env['ORIGINAL_SCRIPT_NAME'.freeze]
+ end
+
def request_method=(request_method) #:nodoc:
if check_method(request_method)
@request_method = env["REQUEST_METHOD"] = request_method