NOTE: This gem is deprecated. The flash helper is pretty trivial and is better placed in an app so it can be customized. The error styling is better handled through a more robust gem like simple_form.
A simple Rails addon that provides for inline validation message and nicely styled flash messages. Includes:
flash_messages helper:: Will output all flash messages in a container to be easily styled. error_messages.css.scss:: Applies nice looking styles that most apps will find reasonable. Provides styling for the flash messages and the inline popup validation messages. error_messages_prototype.js and error_messages_jquery.js.coffee:: For the inline validation messages. This will trigger the display and hiding as the fields get focus. Also for notice messages will slide the message away after few seconds. Provides both a Prototype version and a jQuery version. The notice slideup depends on Script.aculo.us being installed. If using the jQuery version you will need to ensure the coffeescript-rails and jquery-rails gems are in your Gemfile. flash-<type>.png:: For several of the common flash types our stylesheets refer to some images which help convey the message and look nice in most apps. field_error_proc:: Replaces the default field_error_proc so that inline error messages are included on the page. Are hidden by default but the JavaScript will renable as fields get focus.
Since this plugin is mostly about establishing a look we don’t have much in the way of traditional unit testing but we do have a test page that shows everything all laid out so you can adjust and tweak the styles. This special page can be accessed via the path /error_messages and is ONLY available if in the development environment.
Only Rails 3 is supported. For Rails 2.x support see version 0.0.2 of this gem. Prior to Rails 3.1 you will need to copy the assets yourself.
This gem was developed by Eric Anderson (pixelwareinc.com) mostly via work done under Red Tusk Studios (redtusk.com).