Sha256: 118f4d5285a5a387cfe9f4f0589c02d01b10185269b10620805f559d5e687224
Contents?: true
Size: 886 Bytes
Versions: 2
Compression:
Stored size: 886 Bytes
Contents
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. module Ramaze # The purpose of this class is to provide an easy way of setting/retrieving # 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: # # On the first request, for example on registering: # # flash[:error] = "You should reconsider your username, it's taken already" # redirect R(self, :register) # # This is the request from the redirect: # # do_stuff if flash[:error] # # On the request after this, flash[:error] is gone. module FlashHelper private # answers with Session.current.flash def flash Session.current.flash end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ramaze-0.3.0 | lib/ramaze/helper/flash.rb |
ramaze-0.3.5 | lib/ramaze/helper/flash.rb |