class

ActionController::Flash

Inherits Reference < Object

Constants

KEY = "crails_flash"

Constructors

new(cookies : Cookies)
Source

Instance methods

[](key : String | Symbol) : String | Nil

Read the flash; reading marks the key used (Rails: sweep) — a value shown in the current request is not repeated on the next one.

Source
[]=(key : String | Symbol, value : String) : Nil

Rails-семантика: значение видно в текущем запросе (рендер без редиректа) И переносится на следующий, если его не прочитали.

Source
[]?(key : String | Symbol) : String | Nil
Source
discard(key : String | Symbol) : Nil

Rails: discard удаляет ключ целиком — и из текущего показа, и из переноса на следующий запрос.

Source
keep(key : String | Symbol) : Nil
Source
key?(key : String | Symbol) : Bool
Source
now(key : String | Symbol, value : String) : Nil

Shown on the CURRENT request only.

Source