U:RDoc::NormalClass[iI"
Flash:EFI"ActionDispatch::Flash;FI"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[	I"yThe flash provides a way to pass temporary objects between actions. Anything you place in the flash will be exposed ;TI"uto the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create ;TI"|action that sets <tt>flash[:notice] = "Post successfully created"</tt> before redirecting to a display action that can ;TI"cthen expose the flash to its template. Actually, that exposure is automatically done. Example:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim;[I"4class PostsController < ActionController::Base
;TI"  def create
;TI"    # save post
;TI"6    flash[:notice] = "Post successfully created"
;TI"'    redirect_to posts_path(@post)
;TI"  end
;TI"
;TI"  def show
;TI"^    # doesn't need to assign the flash notice to the template, that's done automatically
;TI"  end
;TI"	end
;TI"
;TI"show.html.erb
;TI"  <% if flash[:notice] %>
;TI"9    <div class="notice"><%= flash[:notice] %></div>
;TI"  <% end %>
;T:@format0o;	;[I"aSince the +notice+ and +alert+ keys are a common idiom, convenience accessors are available:;T@o;;[I"+flash.alert = "You must be logged in"
;TI"0flash.notice = "Post successfully created"
;T;0o;	;[I"xThis example just places a string in the flash, but you can put any object in there. And of course, you can put as ;TI"smany as you like at a time too. Just remember: They'll be gone by the time the next action has been performed.;T@o;	;[I"FSee docs on the FlashHash class for more details about the flash.;T:
@fileI",lib/action_dispatch/middleware/flash.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I"
class;T[[:public[[I"new;TI",lib/action_dispatch/middleware/flash.rb;T[:protected[ [:private[ [I"instance;T[[;[[I"	call;F@A[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@5I"ActionDispatch;FcRDoc::NormalModule