Class: Workarea::Admin::FeaturedBrowseOptionProductViewModel
- Inherits:
-
ProductViewModel
- Object
- ProductViewModel
- Workarea::Admin::FeaturedBrowseOptionProductViewModel
- 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_value ⇒ Object
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 |
#id ⇒ Object
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 |
#name ⇒ Object
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 |