Sha256: ac1165c000444d0d2375697b18390a3149b19d9a3ccf7b94e017bf59514bb944

Contents?: true

Size: 422 Bytes

Versions: 4

Compression:

Stored size: 422 Bytes

Contents

module Workarea
  module Api
    module Storefront
      class ProductsController < Api::Storefront::ApplicationController
        before_action :cache_page

        def show
          model = Workarea::Catalog::Product.active.find_by(slug: params[:id])
          @product = Workarea::Storefront::ProductViewModel.wrap(
            model,
            view_model_options
          )
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
workarea-api-4.4.7 storefront/app/controllers/workarea/api/storefront/products_controller.rb
workarea-api-storefront-4.4.7 app/controllers/workarea/api/storefront/products_controller.rb
workarea-api-4.4.6 storefront/app/controllers/workarea/api/storefront/products_controller.rb
workarea-api-storefront-4.4.6 app/controllers/workarea/api/storefront/products_controller.rb