diff options
author | Arun Agrawal <arunagw@gmail.com> | 2013-05-13 12:19:25 +0200 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2013-05-13 12:19:25 +0200 |
commit | d63e44c46116d9771adcae3e2c3fd23bbc535854 (patch) | |
tree | 75a6f602fda61ca1d3b5c4e7a15b04efeffb70f6 /actionpack/lib/action_dispatch/middleware | |
parent | b44f086cf10532ca65d192047f713ffbd1cdcbdb (diff) | |
download | rails-d63e44c46116d9771adcae3e2c3fd23bbc535854.tar.gz rails-d63e44c46116d9771adcae3e2c3fd23bbc535854.tar.bz2 rails-d63e44c46116d9771adcae3e2c3fd23bbc535854.zip |
Fixing build broken by this change
c43ca06ca091fc09e2c86bb051ac92b648f12b64
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/flash.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index f8f9cf7c9f..89003e7a5e 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -243,13 +243,13 @@ module ActionDispatch session = Request::Session.find(env) || {} flash_hash = env[KEY] - if flash_hash.present? || session.key?('flash') + if flash_hash && (flash_hash.present? || session.key?('flash')) session["flash"] = flash_hash.to_session_value env[KEY] = flash_hash.dup end if (!session.respond_to?(:loaded?) || session.loaded?) && # (reset_session uses {}, which doesn't implement #loaded?) - session.key?('flash') && session['flash'].nil? + session.key?('flash') && session['flash'].nil? session.delete('flash') end end |