Class: Workarea::Admin::ProductImagesViewModel
- Inherits:
-
ApplicationViewModel
- Object
- ApplicationViewModel
- Workarea::Admin::ProductImagesViewModel
- Defined in:
- app/view_models/workarea/admin/product_images_view_model.rb
Instance Method Summary collapse
Instance Method Details
#by_option ⇒ Object
3 4 5 6 7 |
# File 'app/view_models/workarea/admin/product_images_view_model.rb', line 3 def by_option @by_option ||= model.images.asc(:position).group_by do |image| image.option.to_s.titleize end end |