Skip to content

Commit

Permalink
Ensure that Rails.env is defined first
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed Oct 27, 2010
1 parent e73b0b8 commit 47ceb13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/middleware/cookies.rb
Expand Up @@ -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

Expand Down

0 comments on commit 47ceb13

Please sign in to comment.