Class: ActiveScaffold::Config::BatchDestroy
- Inherits:
-
Base
- Object
- Base
- ActiveScaffold::Config::BatchDestroy
- Defined in:
- lib/active_scaffold/config/batch_destroy.rb
Constant Summary collapse
- @@link =
[ 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
-
#link ⇒ Object
the ActionLink for this action.
-
#process_mode ⇒ Object
see class accessor.
Class Method Summary collapse
-
.link ⇒ Object
global level configuration ————————– the ActionLink for this action.
- .link=(val) ⇒ Object
Instance Method Summary collapse
-
#initialize(core_config) ⇒ BatchDestroy
constructor
A new instance of BatchDestroy.
-
#label(model = nil) ⇒ Object
the label= method already exists in the Form base class.
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
#link ⇒ Object
the ActionLink for this action
41 42 43 |
# File 'lib/active_scaffold/config/batch_destroy.rb', line 41 def link @link end |
#process_mode ⇒ Object
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
.link ⇒ Object
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 |