Rails-like flash :message replacement
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
LICENSE
README.markdown
Rakefile
TODO
VERSION
merb-flash.gemspec

README.markdown

merb-flash

A plugin for the Merb framework that provides rails-like flash messages

Instalation

gem install merb-flash

# Gemfile
gem "merb-flash", "0.2.0"

Usage

in controller:

redirect url(:homepage), :message => {:notice => "Merb is awesome"}
redirect url(:homepage), :message => {:error => "PHP sux"}
redirect url(:homepage), :message => {:whatever => "you like"}
redirect url(:homepage), :success => "Huray!"

in view:

= message[:notice]
= message[:error]
= message[:success]