lib/roda/plugins/flash.rb in roda-2.24.0 vs lib/roda/plugins/flash.rb in roda-2.25.0
- old
+ new
@@ -25,9 +25,17 @@
# flash['a'] = 'b'
# r.redirect('')
# end
# end
# end
+ #
+ # You can modify the flash for the current request (instead of
+ # the next request) by using the +flash.now+ method:
+ #
+ # r.get do
+ # flash.now['a'] = 'b'
+ # flash['a'] # = >'b'
+ # end
module Flash
# The internal session key used to store the flash.
KEY = :_flash
# Simple flash hash, where assiging to the hash updates the flash