Class: Workarea::Admin::BulkActionSequentialProductEditViewModel
- Inherits:
-
ApplicationViewModel
- Object
- ApplicationViewModel
- Workarea::Admin::BulkActionSequentialProductEditViewModel
- Defined in:
- app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb
Instance Method Summary collapse
Instance Method Details
#first? ⇒ Boolean
4 5 6 |
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 4 def first? index.zero? end |
#index ⇒ Object
20 21 22 |
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 20 def index [:index].to_i end |
#last? ⇒ Boolean
8 9 10 |
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 8 def last? index == model.count - 1 end |
#next ⇒ Object
12 13 14 |
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 12 def next index + 1 end |
#previous ⇒ Object
16 17 18 |
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 16 def previous index - 1 end |