Sha256: 45e517da6da67850cb406adc6608207b1ff0927a6a330759e6d9efe8dd7d04ed
Contents?: true
Size: 924 Bytes
Versions: 13
Compression:
Stored size: 924 Bytes
Contents
class Api::ShipmentsController < Api::BaseController resource_controller_for_api actions :index, :show, :update, :create belongs_to :order private def collection_serialization_options { :include => {:shipping_method => {}, :address => {}, :inventory_units => {:include => :variant}}, :except => [:shipping_method_id, :address_id] } end def object_serialization_options { :include => { :shipping_method => {}, :address => {:include => [:country, :state]}, :inventory_units => { :include => { :variant => { :include => { :product => {:only => [:name]} } } } } }, :except => [:shipping_method_id, :address_id] } end def eager_load_associations [:shipping_method, :address, {:inventory_units => [:variant]}] end end
Version data entries
13 entries across 13 versions & 1 rubygems