User specs in the green

This commit is contained in:
2015-09-21 15:22:43 +02:00
parent cb744943bd
commit 2c3705790c
27 changed files with 112 additions and 30 deletions
+2 -1
View File
@@ -75,7 +75,8 @@ module Users
list = List.from_table( table, current_user )
res[:active_list_id] = list.id # used to set the active list in the app
order = list.place_order product_orders: product_orders, user: current_user, first_order: true
res[:payload] = JSONAPI::Serializer.serialize(order, serializer: Users::OrderSerializer, include: %w[list list.users product_orders])
res[:supplier_orders_placed_count] = list.supplier.orders_placed_count
res[:payload] = Users::OrderSerializer.serialize(order, include: %w[list list.users product_orders])
end
render json: res
end