Module: ActionController::Flash::InstanceMethods

Defined in:
lib/rails3_to_2_flash_serialization.rb

Instance Method Summary collapse

Instance Method Details

#flashObject

Access the contents of the flash. Use flash["notice"] to read a notice you put there or flash["notice"] = "hello" to put a new one.



27
28
29
30
31
32
33
34
# File 'lib/rails3_to_2_flash_serialization.rb', line 27

def flash #:doc:
  if !defined?(@_flash)
    @_flash = session["legacy_flash"] || FlashHash.new
    @_flash.sweep
  end

  @_flash
end