Class: ActiveScaffold::Config::BatchUpdate
- Inherits:
-
Form
- Object
- Form
- ActiveScaffold::Config::BatchUpdate
- Defined in:
- lib/active_scaffold/config/batch_update.rb
Constant Summary collapse
- @@link =
ActiveScaffold::DataStructures::ActionLink.new('batch_edit', :label => :edit, :type => :collection, :security_method => :batch_update_authorized?, :ignore_method => :batch_update_ignore?)
- @@plugin_directory =
File.(__FILE__).match(%{(^.*)/lib/active_scaffold/config/batch_update.rb})[1]
- @@process_mode =
:update
- @@list_mode_enabled =
true
Instance Attribute Summary collapse
-
#list_mode_enabled ⇒ Object
Returns the value of attribute list_mode_enabled.
-
#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(*args) ⇒ BatchUpdate
constructor
A new instance of BatchUpdate.
-
#label(model = nil) ⇒ Object
the label= method already exists in the Form base class.
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_enabled ⇒ Object
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_mode ⇒ Object
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
.link ⇒ Object
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 |