diff options
author | Joost Baaij <joost@spacebabies.nl> | 2010-08-27 22:45:35 +0200 |
---|---|---|
committer | Joost Baaij <joost@spacebabies.nl> | 2010-08-27 22:45:35 +0200 |
commit | 76c569344be9afbc9a6cf5471c2996ecdbd100f6 (patch) | |
tree | 29e4c5b064d764f058251b4d4370fb7f03e214ac | |
parent | 9f4d3a1ebe29c484d550355e98d9adff2d60dfd4 (diff) | |
download | rails-76c569344be9afbc9a6cf5471c2996ecdbd100f6.tar.gz rails-76c569344be9afbc9a6cf5471c2996ecdbd100f6.tar.bz2 rails-76c569344be9afbc9a6cf5471c2996ecdbd100f6.zip |
mention the alert and notice accessors on the flash
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/flash.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 # <div class="notice"><%= flash[:notice] %></div> # <% 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. # |