adds ActionView helper methods
[Source]
# File lib/action_flow/state.rb, line 65 def self.included(base) base.send :helper_method, :state end
Does the same as state(k)
# File lib/action_flow/state.rb, line 57 def [](k) return session[ flow_session_name ].fetch( state_session_name ).fetch( k ) end
Does the sasme as state(k,v)
# File lib/action_flow/state.rb, line 51 def []=(k, v) return session[ flow_session_name ].fetch( state_session_name ).store( k.to_s, v ) end
Returns the state data hash
# File lib/action_flow/state.rb, line 38 def state return session[ flow_session_name ].fetch( state_session_name ) end
Changes the state hash for another one
# File lib/action_flow/state.rb, line 45 def state=(hash) session[ flow_session_name ].store( state_session_name, hash ) return state end
[Validate]