Sha256: adede6a42cb37c1929511e53ccbb60e9988eb4d66a7a10cf061024c884b5058b
Contents?: true
Size: 653 Bytes
Versions: 5
Compression:
Stored size: 653 Bytes
Contents
json.cache! [I18n.locale, Spree::StockLocation.accessible_by(current_ability), variant] do json.(variant, *variant_attributes) json.partial!("spree/api/variants/small", variant: variant) json.total_on_hand(variant.total_on_hand) json.variant_properties(variant.variant_properties) do |variant_property| json.(variant_property, *variant_property_attributes) end json.stock_items(variant.stock_items.accessible_by(current_ability)) do |stock_item| json.(stock_item, :id, :count_on_hand, :stock_location_id, :backorderable) json.available stock_item.available? json.stock_location_name(stock_item.stock_location.name) end end
Version data entries
5 entries across 5 versions & 1 rubygems