Sha256: 29f1340953902f22b8f1da7bed9c9aeecd3ccc0d3d366b0ca673ec3fe791b9ca

Contents?: true

Size: 409 Bytes

Versions: 5

Compression:

Stored size: 409 Bytes

Contents

class Api::ProductsController < Api::BaseController
  resource_controller_for_api
  actions :index, :show, :create, :update
  include Spree::Search

  private
    define_method :collection do
      @searcher = Spree::Config.searcher_class.new(params)
      @collection = @searcher.retrieve_products
    end

    def object_serialization_options
      { :include => [:master, :variants, :taxons] }
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree_api-0.50.4 app/controllers/api/products_controller.rb
spree_api-0.50.3 app/controllers/api/products_controller.rb
spree_api-0.50.2 app/controllers/api/products_controller.rb
spree_api-0.50.1 app/controllers/api/products_controller.rb
spree_api-0.50.0 app/controllers/api/products_controller.rb