From ebdb8633bfaddfee05b4207e5c51c7cf6a790f7d Mon Sep 17 00:00:00 2001 From: lambda_ Date: Thu, 3 Jan 2013 17:40:02 -0500 Subject: Add examples `alert=` and `notice=`, using memes --- actionpack/lib/action_dispatch/middleware/flash.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/lib/action_dispatch') 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 -- cgit v1.2.3