From 76c569344be9afbc9a6cf5471c2996ecdbd100f6 Mon Sep 17 00:00:00 2001 From: Joost Baaij Date: Fri, 27 Aug 2010 22:45:35 +0200 Subject: [PATCH] mention the alert and notice accessors on the flash --- actionpack/lib/action_dispatch/middleware/flash.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index bfa30cf5af..f36eee7626 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -30,6 +30,11 @@ module ActionDispatch #
<%= flash[:notice] %>
# <% end %> # + # Since the +notice+ and +alert+ keys are a common idiom, convenience accessors are available: + # + # flash.alert = "You must be logged in" + # flash.notice = "Successfully created post" + # # This example just places a string in the flash, but you can put any object in there. And of course, you can put as # many as you like at a time too. Just remember: They'll be gone by the time the next action has been performed. #