Class: Workarea::Admin::ListrakConfigurationViewModel

Inherits:
ApplicationViewModel
  • Object
show all
Defined in:
app/view_models/workarea/admin/listrak_configuration_view_model.rb

Instance Method Summary collapse

Instance Method Details

#all_listsObject



4
5
6
# File 'app/view_models/workarea/admin/listrak_configuration_view_model.rb', line 4

def all_lists
  @all_lists ||= Workarea::Listrak.email.lists.all
end

#event_optionsObject



8
9
10
# File 'app/view_models/workarea/admin/listrak_configuration_view_model.rb', line 8

def event_options
  events.map { |event| [event.name, event.id] }
end

#eventsObject



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

def events
  @events ||= Workarea::Listrak.email.events.all default_list_id
end