search for: persistent_attr

Displaying 1 result from an estimated 1 matches for "persistent_attr".

2005 Nov 03
9
[Idea] session-wide persistent variables
I was thinking about having instance variable stored and fetched from session container automatically before calling an action and after the action is finished. Using methodology of accessors it would look like: class MyController < ActionController::Base persistent_attr :person def alfa person = ''John Smith'' # render as usual view alfa.rhtml with anchor link to action beta end def beta render :text => ''Person: '' + person end end This would have scope of hosting controller, but it could be broad...