Class: Spree::Api::V2::Storefront::ProductsController

Inherits:
BaseController
  • Object
show all
Includes:
CollectionOptionsHelpers
Defined in:
app/controllers/spree/api/v2/storefront/products_controller.rb

Instance Method Summary collapse

Methods included from CollectionOptionsHelpers

#collection_links, #collection_meta, #collection_permitted_params

Methods inherited from BaseController

#content_type

Instance Method Details

#indexObject



8
9
10
# File 'app/controllers/spree/api/v2/storefront/products_controller.rb', line 8

def index
  render_serialized_payload { serialize_collection(paginated_collection) }
end

#showObject



12
13
14
# File 'app/controllers/spree/api/v2/storefront/products_controller.rb', line 12

def show
  render_serialized_payload { serialize_resource(resource) }
end