/flash-message-conductor

A simple pattern for managing flash messages in your Ruby on Rails application.

Primary LanguageRubyMIT LicenseMIT

Flash Message Conductor
============

A simple pattern for managing flash messages in your Ruby on Rails application.


Example
=======

# Controller helpers

add_success( 'foo' )

is the equivalent of

flash[:success] = 'foo'

Controller helpers included:

add_success( message ) 
add_notice( message )
add_failure( message )

# View helpers

<%= render_flash_messages %>

produces:

<div id="flash">
  <p class="success">You have successfully done XYZ...</p>
</div>

# or... if you set an failure

<div id="flash">
  <p class="failure">Oops! Something went bonkers!</p>
</div>



Copyright (c) 2008 Planet Argon, released under the MIT license