class Amber::Pipe::Flash

Overview

Carries the flash from one request to the next through the session.

The session is written only when the flash has messages to carry, or when the session still holds a flash that is now empty and must be cleared. A request that never sets a flash leaves the session unchanged, so a visitor without a session cookie is given no session.

Defined in:

amber/pipes/flash.cr

Constant Summary

EMPTY_FLASH_JSON = "{}"

The session form of a flash with no messages.

PARAM_KEY = "_flash"

Instance Method Summary

Instance methods inherited from class Amber::Pipe::Base

call(context : HTTP::Server::Context) call

Instance Method Detail

def call(context) #

[View source]