Clean & Pretty flash[:notice] and flash[:error] in Rails
I’ve been using this little snippet quite often for our Rails applications, so I thought I’d share it. It uses minimal code to output the flash[:notice] and flash[:error] messages in colors correlating to their purpose and then fades them away.

Here’s the CSS used followed by the Erb code I use in my layout:



April 7th, 2009 at 5:02 pm
Thanks, really nice
November 27th, 2009 at 1:07 am
There is also sexy_flash, but I can only find four effects that work and it is buggy with redirects and renders.
I found this useful.
Leumas
February 5th, 2010 at 1:55 pm
Thanks, I used the style css of this tutorial for the message boxes:
http://css.dzone.com/news/css-message-boxes-different-me
and content_tag :span instead content_tag :div
The result is very nice.
Thanks again.