diff --git a/app/views/api/order_cycles/bulk_show.v1.rabl b/app/views/api/order_cycles/bulk_show.v1.rabl index 7acffca853..814985ef53 100644 --- a/app/views/api/order_cycles/bulk_show.v1.rabl +++ b/app/views/api/order_cycles/bulk_show.v1.rabl @@ -1,3 +1,9 @@ object @order_cycle -attributes :id, :name \ No newline at end of file +attributes :id, :name +node( :suppliers ) do |oc| + partial 'spree/api/enterprises/bulk_index', :object => oc.suppliers +end +node( :distributors ) do |oc| + partial 'spree/api/enterprises/bulk_index', :object => oc.distributors +end \ No newline at end of file diff --git a/spec/controllers/api/order_cycles_controller_spec.rb b/spec/controllers/api/order_cycles_controller_spec.rb index 3524aafc94..3c562840f5 100644 --- a/spec/controllers/api/order_cycles_controller_spec.rb +++ b/spec/controllers/api/order_cycles_controller_spec.rb @@ -8,7 +8,7 @@ module Api let!(:oc1) { FactoryGirl.create(:order_cycle) } let!(:oc2) { FactoryGirl.create(:order_cycle) } - let(:attributes) { [:id, :name] } + let(:attributes) { [:id, :name, :suppliers, :distributors] } before do stub_authentication!