Class: ActiveScaffold::Config::BatchUpdate

Inherits:
Form
  • Object
show all
Defined in:
lib/active_scaffold/config/batch_update.rb

Constant Summary collapse

ActiveScaffold::DataStructures::ActionLink.new('batch_edit', :label => :edit, :type => :collection, :security_method => :batch_update_authorized?, :ignore_method => :batch_update_ignore?)
@@plugin_directory =
File.expand_path(__FILE__).match(%{(^.*)/lib/active_scaffold/config/batch_update.rb})[1]
@@process_mode =
:update
@@list_mode_enabled =
true

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ BatchUpdate

Returns a new instance of BatchUpdate.



4
5
6
7
8
9
# File 'lib/active_scaffold/config/batch_update.rb', line 4

def initialize(*args)
  super
  @process_mode = self.class.process_mode
  @action_group ||= 'collection.batch'
  @list_mode_enabled = self.class.list_mode_enabled
end

Instance Attribute Details

#list_mode_enabledObject

Returns the value of attribute list_mode_enabled.



43
44
45
# File 'lib/active_scaffold/config/batch_update.rb', line 43

def list_mode_enabled
  @list_mode_enabled
end

#process_modeObject

see class accessor



41
42
43
# File 'lib/active_scaffold/config/batch_update.rb', line 41

def process_mode
  @process_mode
end

Class Method Details

global level configuration


the ActionLink for this action



14
15
16
# File 'lib/active_scaffold/config/batch_update.rb', line 14

def self.link
  @@link
end

.link=(val) ⇒ Object



17
18
19
# File 'lib/active_scaffold/config/batch_update.rb', line 17

def self.link=(val)
  @@link = val
end

Instance Method Details

#label(model = nil) ⇒ Object

the label= method already exists in the Form base class



47
48
49
50
# File 'lib/active_scaffold/config/batch_update.rb', line 47

def label(model = nil)
  model ||= @core.label(:count => 2)
  @label ? as_(@label) : as_(:update_model, :model => model)
end