class Reactor::SessionHelper::SessionState

Constants

SESSION_ID_KEY
USER_NAME_KEY

Attributes

session[RW]

Public Class Methods

new(session) click to toggle source
Calls superclass method
# File lib/reactor/session_helper.rb, line 47
def initialize(session)
  self.session = session
  super(session[USER_NAME_KEY], session[SESSION_ID_KEY])
end

Public Instance Methods

session_id=(new_session_id) click to toggle source
Calls superclass method
# File lib/reactor/session_helper.rb, line 61
def session_id=(new_session_id)
  super
  # see above
  self.session[SESSION_ID_KEY] = new_session_id
  new_session_id
end
user_name=(new_user_name) click to toggle source
Calls superclass method
# File lib/reactor/session_helper.rb, line 52
def user_name=(new_user_name)
  super
  # this is a little bit of magic: it will trigger
  # the the session serialization routine, and will
  # persist the new information after processing the request
  self.session[USER_NAME_KEY] = new_user_name
  new_user_name
end