public
Description: xhr_flash Rails plugin makes your flash[] messages visible when using AJAX with RJS templates or link_to_remote partials.
Clone URL: git://github.com/yaroslav/xhr_flash.git
name age message
file MIT-LICENSE Sat Apr 05 02:22:20 -0700 2008 initial commit [yaroslav]
file README Sat Apr 26 12:43:25 -0700 2008 README note regarding Prototype added [yaroslav]
file Rakefile Sat Apr 05 02:22:20 -0700 2008 initial commit [yaroslav]
file init.rb Sat Apr 05 02:22:20 -0700 2008 initial commit [yaroslav]
file install.rb Sat Apr 05 02:22:20 -0700 2008 initial commit [yaroslav]
directory lib/ Sat Apr 26 12:43:25 -0700 2008 README note regarding Prototype added [yaroslav]
directory spec/ Sat Apr 05 02:32:23 -0700 2008 CDATA stuff for javascript for compatibility [yaroslav]
directory tasks/ Sat Apr 05 02:22:20 -0700 2008 initial commit [yaroslav]
file uninstall.rb Sat Apr 05 02:22:20 -0700 2008 initial commit [yaroslav]
README
xhr_flash
=========

xhr_flash is a plugin designed to enable flash[] Rails messaging system to be acessible with AJAX controllers
(when using partials or RJS templates). Your flash messages are displayed by updating certain element on a webpage.

See docs for details.

Example
=======

  class MyController < ApplicationController
    xhr_flash :notice

    # ...

will watch for your <tt>flash[:notice]</tt> and update an element with <tt>id="flash_notice"</tt> when using AJAX 
requests.

  class MyController < ApplicationController
    xhr_flash :error, :id => "emergency"

    # ...

will watch for your <tt>flash[:error]</tt> and update an element with <tt>id="emergency"</tt> when using AJAX requests.

Note that you'll need Prototype library. <tt><%= javascript_include_tag :defaults %></tt> in your layout template is 
usually enough.

Copyright (c) 2008 Sergey Sazonov <sergsazonov@gmail.com>, Yaroslav Markin <yaroslav@markin.net>, released under the MIT 
license