diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-05 17:24:48 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-05 17:24:48 -0700 |
commit | de59e6ebad0cc829e60e2444f03230aef8228980 (patch) | |
tree | ce8954c75d665998faf00dfc0cc1da4dc37ed381 /actionpack/lib/action_controller | |
parent | a31bfe69837b63a6501925d37e1ebd149e90e1a0 (diff) | |
download | rails-de59e6ebad0cc829e60e2444f03230aef8228980.tar.gz rails-de59e6ebad0cc829e60e2444f03230aef8228980.tar.bz2 rails-de59e6ebad0cc829e60e2444f03230aef8228980.zip |
move env access to the request object.
Accessing a request object has nice advantages over accessing a hash.
If you use a missing method name, you'll get an exception rather than a
`nil` (is one nice feature)
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/request_forgery_protection.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index 9e09242872..99c2287fcb 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -161,11 +161,11 @@ module ActionController #:nodoc: class NullCookieJar < ActionDispatch::Cookies::CookieJar #:nodoc: def self.build(request) - key_generator = request.env[ActionDispatch::Cookies::GENERATOR_KEY] + key_generator = request.key_generator host = request.host secure = request.ssl? - new(key_generator, host, secure, options_for_env({})) + new(key_generator, host, secure, options_for_req(request)) end def write(*) |