Netzke::Session

This modules provides (component-specific) session manupulation. The :session_persistence config option should be set to true in order for the component to make use of this.

Public Instance Methods

component_session() click to toggle source

Component-specific session.

# File lib/netzke/session.rb, line 31
def component_session
  @component_session_proxy ||= ComponentSessionProxy.new(global_id)
end
session() click to toggle source

Top-level session (straight from the controller).

# File lib/netzke/session.rb, line 26
def session
  ::Netzke::Core.session
end
session_options() click to toggle source

Returns this component’s configuration options stored in the session. Those get merged into the component’s configuration at instantiation.

# File lib/netzke/session.rb, line 36
def session_options
  session_persistence_enabled? && component_session[:options] || {}
end
update_session_options(hash) click to toggle source

Updates the session options

# File lib/netzke/session.rb, line 41
def update_session_options(hash)
  if session_persistence_enabled?
    component_session.deep_merge!(:options => hash)
  else
    logger.debug "Netzke warning: No session persistence enabled for component '#{global_id}'"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.