mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
mention the alert and notice accessors on the flash
This commit is contained in:
parent
9f4d3a1ebe
commit
76c569344b
1 changed files with 5 additions and 0 deletions
|
@ -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.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue