Flash Toast
Toast notifications rendered from the Rails
flash
hash via the popover API. Place
app_theme_flash(flash)
once in the layout.
Supported keys:
notice
and
success
render green,
alert
and
error
red, plus
warning
and
info
. Messages built with
link_to
keep their links; everything else is escaped.
Demo (renders on page load)
Changes saved successfully.
Storage is almost full.
- demo_flash = { "notice" => "Changes saved successfully.", "warning" => "Storage is almost full." }
= app_theme_flash(demo_flash)Layout usage
%body
= app_theme_flash(flash)
= yield