Sha256: 628c8615b51f69c271efa6b14a03afab917a374dbc6493980ea7fcc63becb593

Contents?: true

Size: 321 Bytes

Versions: 5

Compression:

Stored size: 321 Bytes

Contents

module Workarea
  module FeaturedBrowseOptionProducts
    def featured_product?(id)
      product_ids.any? do |product_id|
        product_id == id || BrowseOptionIds.extract(product_id) == id
      end
    end

    def unique_product_ids
      product_ids.map { |id| BrowseOptionIds.extract(id) }.uniq
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-browse_option-2.2.0 app/models/workarea/featured_browse_option_products.rb
workarea-browse_option-2.1.9 app/models/workarea/featured_browse_option_products.rb
workarea-browse_option-2.1.8 app/models/workarea/featured_browse_option_products.rb
workarea-browse_option-2.1.7 app/models/workarea/featured_browse_option_products.rb
workarea-browse_option-2.1.6 app/models/workarea/featured_browse_option_products.rb