diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-10-27 10:30:14 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2010-10-27 10:30:14 +0100 |
commit | 47ceb135c6b75988f2712bc44db397b992c1c731 (patch) | |
tree | 8704749b0ec43dfd1a7f1edc2c8e12905198489d /actionpack | |
parent | e73b0b84d939af241dfbba8931d8add9724595e4 (diff) | |
download | rails-47ceb135c6b75988f2712bc44db397b992c1c731.tar.gz rails-47ceb135c6b75988f2712bc44db397b992c1c731.tar.bz2 rails-47ceb135c6b75988f2712bc44db397b992c1c731.zip |
Ensure that Rails.env is defined first
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 836416857c..c4c2e1acd7 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -202,7 +202,7 @@ module ActionDispatch private def write_cookie?(cookie) - @secure || !cookie[:secure] || Rails.env.development? + @secure || !cookie[:secure] || defined?(Rails.env) && Rails.env.development? end end |