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 Instance Methods

crud_type() click to toggle source

delegate

# File lib/active_scaffold/config/base.rb, line 27
def crud_type; self.class.crud_type end
formats() click to toggle source
# File lib/active_scaffold/config/base.rb, line 55
def formats
  @formats ||= []
end
formats=(val) click to toggle source
# File lib/active_scaffold/config/base.rb, line 59
def formats=(val)
  @formats=val
end
label(model = nil) click to toggle source
# File lib/active_scaffold/config/base.rb, line 29
def label(model = nil)
  model ||= @core.label(:count => 1)
  @label.nil? ? model : as_(@label, :model => model)
end

Public Class Methods

inherited(subclass) click to toggle source
# File lib/active_scaffold/config/base.rb, line 11
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
  @action_group = self.class.action_group.clone if self.class.action_group
end