diff options
Diffstat (limited to 'actionpack/lib/action_controller/flash.rb')
-rw-r--r-- | actionpack/lib/action_controller/flash.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/flash.rb b/actionpack/lib/action_controller/flash.rb index ea7a49ab77..5751fe6e93 100644 --- a/actionpack/lib/action_controller/flash.rb +++ b/actionpack/lib/action_controller/flash.rb @@ -155,8 +155,8 @@ module ActionController #:nodoc: # <tt>flash["notice"] = "hello"</tt> to put a new one. # Note that if sessions are disabled only flash.now will work. def flash(refresh = false) #:doc: - if @flash.nil? || refresh - @flash = + if !defined?(@flash) || refresh + @flash = if @session.is_a?(Hash) # @session is a Hash, if sessions are disabled # we don't put the flash in the session in this case |