Parent

Methods

Files

Class/Module Index [+]

Quicksearch

ActiveScaffold::Config::Base::UserSettings

Public Class Methods

new(conf, storage, params, action = :base) click to toggle source
# File lib/active_scaffold/config/base.rb, line 45
def initialize(conf, storage, params, action = :base)
  # the session hash relevant to this action
  @session = storage
  # all the request params
  @params = params
  # the configuration object for this action
  @conf = conf
  @action = action
end

Public Instance Methods

[](key) click to toggle source
# File lib/active_scaffold/config/base.rb, line 55
def [](key)
  @session[@action][key] if @action && @session[@action]
end
[]=(key, value) click to toggle source
# File lib/active_scaffold/config/base.rb, line 59
def []=(key, value)
  @session[@action] ||= {}
  if value
    @session[@action][key] = value
  else
    @session[@action].delete key
    @session.delete @action if @session[@action].empty?
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.