Skip to Content Skip to Search

module ActionDispatch::Flash::RequestMethods

Public instance methods

Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash.

See ActionDispatch::Flash for example usage.

Source code GitHub
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 57
def flash
  flash = flash_hash
  return flash if flash
  self.flash = Flash::FlashHash.from_session_value(session["flash"])
end
Source code GitHub
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 63
def flash=(flash)
  set_header Flash::KEY, flash
end

Definition files