Class: ActiveScaffold::Config::Core::UserSettings
Instance Method Summary
collapse
#configure
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) ? action_user_settings(value) : value
end
|
Instance Method Details
#action_links ⇒ Object
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_user_settings(action_config)
if action_config.user.nil? && action_config.respond_to?(:new_user_settings)
action_config.new_user_settings @storage, @params
end
action_config.user || action_config
end
|
358
359
360
|
# File 'lib/active_scaffold/config/core.rb', line 358
def actions
@conf.actions end
|
346
347
348
|
# File 'lib/active_scaffold/config/core.rb', line 346
def columns
@columns ||= UserColumns.new(@conf.columns)
end
|
354
355
356
|
# File 'lib/active_scaffold/config/core.rb', line 354
def model
@conf.model end
|
#respond_to_missing?(name, include_all = false) ⇒ Boolean
335
336
337
|
# File 'lib/active_scaffold/config/core.rb', line 335
def respond_to_missing?(name, include_all = false)
super end
|