Rails plugin that provides “pretty” flash messages.
In the controller…
This plugin gives a couple of convenience methods for setting flash messages.
notice "Hooray! You did something good." warning "Uhm, You're not allowed to do that yet." error "Ooooops! Something went wrong."
Use those instead of the typical
flash[:notice] = "Some String" (all it does is set that for you).
In the view…
Then all you have to do to display them is:
<%= display_flash_messages %>
a rake task that installs this stuff where it needs to be (inside the public/ directory).
$ rake pretty_flash:install
WARNING: this will overwrite any of the files that have the same name. So double check if you don’t want that to happen.
seconds (defaults to 25 seconds). If you want that, I’ve provide support for prototype and jquery, so just copy whichever
one you’re using into application.js and you’re all set. If you’re not using either, sorry :-)
Copyright © 2008 Ryan Heath, released under the MIT license