class 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 51 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.to_s end
Public Instance Methods
[](key)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 61 def [](key) @session[@action][key] if @action && @session[@action] end
[]=(key, value)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 65 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