Sha256: de503cb76f5e30c36c608d2a3b3d28eee8d33b1f4ac9104df081668d0542aff1

Contents?: true

Size: 270 Bytes

Versions: 3

Compression:

Stored size: 270 Bytes

Contents

json.cache! @product do
  json.(@product, :id, :tb_commerce_category_id, :title, :description, :price, :slug)
  json.skus do
    json.array! @product.product_skus do |sku|
      json.(sku, :id, :sku, :stock)
      json.price number_to_currency(:price)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 app/views/tb_commerce/api/products/show.json.jbuilder
tb_commerce-0.0.3 app/views/tb_commerce/api/products/show.json.jbuilder
tb_commerce-0.0.2 app/views/tb_commerce/api/products/show.json.jbuilder