Marten::HTTP::FlashStore
Inherits Marten::Template::Object / Marten::Template::CanDefineTemplateAttributes / Enumerable / Reference / Object
Represents a flash messages store.
This store provides a way to pass basic string messages from one handler to another. Any string value that is set in this store will be available to the next handler processing the next request, and then it will be cleared out.
Constructors
Class methods
Allows to initialize a flash store from a session store.
Flash session values that were previously set (likely by the flash middleware) will be used to populate the new flash store.
Instance methods
Returns the message for the passed key, or raises a KeyError exception if not found.
Deletes the message for the passed key and returns its value, otherwise returns nil.
Deletes the message for the passed key and returns its value, or calls a block with the key when not found.
Discards all the flash messages or either one specific flash message key by the end of the current request.
Returns the message for the passed key, or the passed default if not found.
Returns the message for the passed key, or calls a block with the key when not found.
Returns true if a message associated with the passed key exists.
Keeps all the flash messages or either one specific flash message key for the next request.
Persists the content of the current flash store into the passed session store.