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
#default_partial, #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
17 18 19 |
# File 'app/models/carnival/batch_action.rb', line 17 def name @name end |
#params ⇒ Object
13 14 15 |
# File 'app/models/carnival/batch_action.rb', line 13 def params @params end |
#to_label ⇒ Object
21 22 23 |
# File 'app/models/carnival/batch_action.rb', line 21 def to_label I18n.t("#{@presenter.model_name}.#{name}") end |