rds / flash-message-conductor

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

Home Page:http://github.com/planetargon/flash-message-conductor/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

http://github.com/planetargon/flash-message-conductor/

License:MIT License


Languages

Language:Ruby 100.0%