Class: Carnival::BatchAction
- Defined in:
- app/models/carnival/batch_action.rb
Constant Summary
Constants inherited from Action
Action::PARTIAL_DEFAULT, Action::PARTIAL_DELETE, Action::PARTIAL_REMOTE
Instance Method Summary collapse
-
#initialize(presenter, name, params = {}) ⇒ BatchAction
constructor
A new instance of BatchAction.
- #name ⇒ Object
- #params ⇒ Object
- #to_label ⇒ Object
Methods inherited from Action
#data, #default_partial, #hidden?, #partial, #path, #remote?, #show, #target
Constructor Details
#initialize(presenter, name, params = {}) ⇒ BatchAction
Returns a new instance of BatchAction.
5 6 7 8 9 10 |
# File 'app/models/carnival/batch_action.rb', line 5 def initialize(presenter, name, params={}) @presenter = presenter @name = name @params = params @path = params[:path] if params[:path].present? end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'app/models/carnival/batch_action.rb', line 16 def name @name end |
#params ⇒ Object
12 13 14 |
# File 'app/models/carnival/batch_action.rb', line 12 def params @params end |
#to_label ⇒ Object
20 21 22 |
# File 'app/models/carnival/batch_action.rb', line 20 def to_label I18n.t("#{@presenter.model_name}.#{name}") end |