flash_message
Flashes a message.
Flash a message
Use flash_message
in your routes to flash a message.
flash_message "Your changes have been saved."
Showing messages
In your layouts, use flash_messages
to show it.
[app/views/layout.haml (haml)]
- if flash_messages?
#messages
- flash_messages.each do |msg|
%li= msg
- if flash_errors?
#errors
- flash_errors.each do |msg|
%li= msg