diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/flash.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index f24e9b8e18..7e00510fa8 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -60,11 +60,21 @@ module ActionDispatch end # Convenience accessor for flash.now[:alert]= + # + # Example: + # + # flash.alert = "Error: no cheezburger" + # # Equivlant to flash[:alert] = "No cheezburger" def alert=(message) self[:alert] = message end # Convenience accessor for flash.now[:notice]= + # + # Example: + # + # flash.notice = "Bukkit stolen" + # # Equivlant to flash[:notice] = "Bukkit stolen" def notice=(message) self[:notice] = message end |