class ActiveScaffold::Config::Base
Attributes
action_group[RW]
action_group
this action should belong to
user[RW]
the user property gets set to the instantiation of the local UserSettings
class during the automatic instantiation of this class.
Public Class Methods
inherited(subclass)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 10 def self.inherited(subclass) class << subclass # the crud type of the action. possible values are :create, :read, :update, :delete, and nil. # this is not a setting for the developer. it's self-description for the actions. def crud_type; @crud_type; end protected def crud_type=(val) raise ArgumentError, "unknown CRUD type #{val}" unless [:create, :read, :update, :delete].include?(val.to_sym) @crud_type = val.to_sym end end end
new(core_config)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 6 def initialize(core_config) @core = core_config end
Public Instance Methods
columns=(val)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 64 def columns=(val) @columns = ActiveScaffold::DataStructures::ActionColumns.new(*val) @columns.action = self @columns.set_columns(@core.columns) if @columns.respond_to?(:set_columns) @columns end
crud_type()
click to toggle source
delegate
# File lib/active_scaffold/config/base.rb, line 26 def crud_type; self.class.crud_type end
formats()
click to toggle source
# File lib/active_scaffold/config/base.rb, line 54 def formats @formats ||= [] end
formats=(val)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 58 def formats=(val) @formats=val end
label(model = nil)
click to toggle source
# File lib/active_scaffold/config/base.rb, line 28 def label(model = nil) model ||= @core.label(:count => 1) @label.nil? ? model : as_(@label, :model => model) end