Class: Workarea::Admin::FeaturedBrowseOptionProductViewModel

Inherits:
ProductViewModel
  • Object
show all
Defined in:
app/view_models/workarea/admin/featured_browse_option_product_view_model.rb

Overview

Used for displaying each product option in feature product UI

Instance Method Summary collapse

Instance Method Details

#browse_option_valueObject



13
14
15
# File 'app/view_models/workarea/admin/featured_browse_option_product_view_model.rb', line 13

def browse_option_value
  @options[model.browse_option]
end

#idObject



5
6
7
# File 'app/view_models/workarea/admin/featured_browse_option_product_view_model.rb', line 5

def id
  BrowseOptionIds.for(model, browse_option_value)
end

#nameObject



9
10
11
# File 'app/view_models/workarea/admin/featured_browse_option_product_view_model.rb', line 9

def name
  [model.name, browse_option_value&.titleize].compact.join(' - ')
end