lib/ramaze/helper/flash.rb in ramaze-2011.07.25 vs lib/ramaze/helper/flash.rb in ramaze-2011.10.23

- old
+ new

@@ -7,20 +7,18 @@ # from the current flash. # # Flash is a way to keep a temporary pairs of keys and values for the duration # of two requests, the current and following. # - # Very vague Example: + # Time for an example. On the first request, for example on registering: # - # On the first request, for example on registering: + # flash[:error] = "You should reconsider your username, it's taken already" + # redirect r(:register) # - # flash[:error] = "You should reconsider your username, it's taken already" - # redirect r(:register) - # # This is the request from the redirect: # - # do_stuff if flash[:error] + # do_stuff if flash[:error] # # On the request after this, flash[:error] is gone. module Helper module Flash @@ -57,8 +55,8 @@ values.flatten.map do |value| tag.gsub(/%key/, key.to_s).gsub(/%value/, value.to_s) end }.flatten.join("\n") end - end - end -end + end # Flash + end # Helper +end # Ramaze