Sha256: 4282b1e560057e73ad3f336f7f8599883165eefcd43d890d73729cf7e8918ae7

Contents?: true

Size: 580 Bytes

Versions: 2

Compression:

Stored size: 580 Bytes

Contents

object @variant
attributes *variant_attributes

cache [I18n.locale, @current_user_roles.include?('admin'), 'big_variant', root_object]

extends "spree/api/variants/small"

node :total_on_hand do
  root_object.total_on_hand
end

child :variant_properties => :variant_properties do
  attributes *variant_property_attributes
end

child(root_object.stock_items.accessible_by(current_ability) => :stock_items) do
  attributes :id, :count_on_hand, :stock_location_id, :backorderable
  attribute :available? => :available
  node(:stock_location_name) { |si| si.stock_location.name }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_api-1.1.0.pre1 app/views/spree/api/variants/big.v1.rabl
solidus_api-1.1.0.beta1 app/views/spree/api/variants/big.v1.rabl