Class: ActiveScaffold::Config::Core::UserSettings

Inherits:
Base::UserSettings show all
Includes:
ActiveScaffold::Configurable
Defined in:
lib/active_scaffold/config/core.rb

Instance Method Summary collapse

Methods included from ActiveScaffold::Configurable

#configure

Methods inherited from Base::UserSettings

#[], #[]=, #core, #initialize, #key?, #proxy_to_conf?, session_attr, #user, user_attr

Constructor Details

This class inherits a constructor from ActiveScaffold::Config::Base::UserSettings

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



330
331
332
333
# File 'lib/active_scaffold/config/core.rb', line 330

def method_missing(name, *args)
  value = @conf.actions.include?(name) ? @conf.send(name) : super
  value.is_a?(Base) ? (value) : value
end

Instance Method Details



350
351
352
# File 'lib/active_scaffold/config/core.rb', line 350

def action_links
  @action_links ||= CowProxy.wrap(@conf.action_links)
end

#action_user_settings(action_config) ⇒ Object



339
340
341
342
343
344
# File 'lib/active_scaffold/config/core.rb', line 339

def (action_config)
  if action_config.user.nil? && action_config.respond_to?(:new_user_settings)
    action_config. @storage, @params
  end
  action_config.user || action_config
end

#actionsObject



358
359
360
# File 'lib/active_scaffold/config/core.rb', line 358

def actions
  @conf.actions # for performance, called many times, so we avoid method_missing
end

#columnsObject



346
347
348
# File 'lib/active_scaffold/config/core.rb', line 346

def columns
  @columns ||= UserColumns.new(@conf.columns)
end

#modelObject



354
355
356
# File 'lib/active_scaffold/config/core.rb', line 354

def model
  @conf.model # for performance, called many times, so we avoid method_missing
end

#respond_to_missing?(name, include_all = false) ⇒ Boolean

Returns:

  • (Boolean)


335
336
337
# File 'lib/active_scaffold/config/core.rb', line 335

def respond_to_missing?(name, include_all = false)
  super # avoid rubocop warning
end