Sha256: fb53a59ba9de35642b37616bbfa2ed902338c298b72314592f83e353bc1aacf6

Contents?: true

Size: 442 Bytes

Versions: 1

Compression:

Stored size: 442 Bytes

Contents

# frozen_string_literal: true
module Spree
  class Product
    module Recommendable
      extend ActiveSupport::Concern

      class_methods do
        ##
        # Get recommendations for products.
        # @return [Recommendations::Recommendable::Products]
        #
        def recommendations
          @recommend_client ||= SolidusRecommendations::Client.new
          @recommend_client.products
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_recommendations-0.0.2 app/models/concerns/spree/product/recommendable.rb