Permalink
Browse files

Ensure that Rails.env is defined first

  • Loading branch information...
1 parent 63b0d0e commit 0d23c2160dd766cfc9cb0cba3904d34d4bf22d70 @pixeltrix pixeltrix committed Oct 27, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -202,7 +202,7 @@ def write(headers)
private
def write_cookie?(cookie)
- @secure || !cookie[:secure] || Rails.env.development?
+ @secure || !cookie[:secure] || defined?(Rails.env) && Rails.env.development?
end
end

0 comments on commit 0d23c21

Please sign in to comment.