Class: ActiveScaffold::Config::Revision

Inherits:
Base show all
Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb

Constant Summary collapse

ActiveScaffold::DataStructures::ActionLink.new('revision', :label => :revision, :type => :record, :security_method => :revision_authorized?)

Instance Attribute Summary collapse

Attributes inherited from Base

#user

Instance Method Summary collapse

Methods inherited from Base

#crud_type, #formats, #formats=, inherited

Methods included from ActiveScaffold::Configurable

#configure, #method_missing

Constructor Details

#initialize(core_config) ⇒ Revision

Returns a new instance of Revision.



8
9
10
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb', line 8

def initialize(core_config)
  @core = core_config
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable

Instance Attribute Details

#labelObject



22
23
24
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb', line 22

def label
  @label ? as_(@label) : as_(:revisions_for_model, :model => @core.label.singularize)
end

Instance Method Details

#columnsObject

provides access to the list of columns specifically meant for this action to use



27
28
29
30
31
32
33
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb', line 27

def columns
  unless @columns
    self.columns = @core.columns._inheritable 
    self.columns.exclude @core.columns.active_record_class.locking_column.to_sym
  end
  @columns
end

#columns=(val) ⇒ Object



34
35
36
37
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb', line 34

def columns=(val)
  @columns = ActiveScaffold::DataStructures::ActionColumns.new(*val)
  @columns.action = self
end