Class: ActiveScaffold::Config::BatchDestroy

Inherits:
Base
  • Object
show all
Defined in:
lib/active_scaffold/config/batch_destroy.rb

Constant Summary collapse

[ ActiveScaffold::DataStructures::ActionLink.new('batch_destroy', :label => :listed, :type => :collection, :method => :delete, :position => false, :crud_type => :delete, :confirm => :are_you_sure_to_delete, :parameters => {:batch_scope => 'LISTED'},:security_method => :batch_destroy_authorized?),
ActiveScaffold::DataStructures::ActionLink.new('batch_destroy', :label => :marked, :type => :collection, :method => :delete, :position => false, :crud_type => :delete, :confirm => :are_you_sure_to_delete, :parameters => {:batch_scope => 'MARKED'}, :security_method => :batch_destroy_authorized?, :ignore_method => :batch_destroy_marked_ignore?)]
@@plugin_directory =
@@process_mode =
:delete

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(core_config) ⇒ BatchDestroy

Returns a new instance of BatchDestroy.



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

def initialize(core_config)
  super
  @action_group ||= 'collection.batch.destroy'
  @process_mode = self.class.process_mode
end

Instance Attribute Details

the ActionLink for this action



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

def link
  @link
end

#process_modeObject

see class accessor



38
39
40
# File 'lib/active_scaffold/config/batch_destroy.rb', line 38

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_destroy.rb', line 14

def self.link
  @@link
end

.link=(val) ⇒ Object



17
18
19
# File 'lib/active_scaffold/config/batch_destroy.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



44
45
46
47
# File 'lib/active_scaffold/config/batch_destroy.rb', line 44

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