Sha256: 9ad570544b52f198c8276e9143337bf64aa1e93e6090da225b79d518e81cfc3f

Contents?: true

Size: 439 Bytes

Versions: 5

Compression:

Stored size: 439 Bytes

Contents

module Workarea
  module Admin
    # Used for displaying each product option in feature product UI
    class FeaturedBrowseOptionProductViewModel < ProductViewModel
      def id
        BrowseOptionIds.for(model, browse_option_value)
      end

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

      def browse_option_value
        @options[model.browse_option]
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-browse_option-2.2.0 app/view_models/workarea/admin/featured_browse_option_product_view_model.rb
workarea-browse_option-2.1.9 app/view_models/workarea/admin/featured_browse_option_product_view_model.rb
workarea-browse_option-2.1.8 app/view_models/workarea/admin/featured_browse_option_product_view_model.rb
workarea-browse_option-2.1.7 app/view_models/workarea/admin/featured_browse_option_product_view_model.rb
workarea-browse_option-2.1.6 app/view_models/workarea/admin/featured_browse_option_product_view_model.rb