diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-13 07:18:22 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-05-13 07:18:22 -0700 |
commit | 465e459bcc56792933c3639d40cc07f53e4d0667 (patch) | |
tree | 75a6f602fda61ca1d3b5c4e7a15b04efeffb70f6 /actionpack/lib/action_dispatch/middleware/flash.rb | |
parent | b44f086cf10532ca65d192047f713ffbd1cdcbdb (diff) | |
parent | d63e44c46116d9771adcae3e2c3fd23bbc535854 (diff) | |
download | rails-465e459bcc56792933c3639d40cc07f53e4d0667.tar.gz rails-465e459bcc56792933c3639d40cc07f53e4d0667.tar.bz2 rails-465e459bcc56792933c3639d40cc07f53e4d0667.zip |
Merge pull request #10592 from arunagw/build-fix-flash-hash
Fixing build broken by this change
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/flash.rb')
-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 |