From 47ceb135c6b75988f2712bc44db397b992c1c731 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Wed, 27 Oct 2010 10:30:14 +0100 Subject: Ensure that Rails.env is defined first --- actionpack/lib/action_dispatch/middleware/cookies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') 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 -- cgit v1.2.3