Module: Toolbox::SessionParams::ClassMethods
- Defined in:
- lib/toolbox/session_params.rb
Instance Method Summary collapse
-
#session_params(*params) ⇒ Object
Makes the given parameters “persistend’ (per controller).
Instance Method Details
#session_params(*params) ⇒ Object
Makes the given parameters “persistend’ (per controller). The listed parameters will be stored in the session. In a before filter, the params hash is set with the value from the session, if (and only if) the parameter does not exist in the session. Otherwise the session value is updated.
19 20 21 |
# File 'lib/toolbox/session_params.rb', line 19 def session_params *params write_inheritable_attribute('session_params', params) end |