Class: Workarea::Admin::BulkActionSequentialProductEditViewModel

Inherits:
ApplicationViewModel
  • Object
show all
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

#indexObject



20
21
22
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 20

def index
  options[: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

#nextObject



12
13
14
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 12

def next
  index + 1
end

#previousObject



16
17
18
# File 'app/view_models/workarea/admin/bulk_action_sequential_product_edit_view_model.rb', line 16

def previous
  index - 1
end