diff options
-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 |