rspec seems to behave now

This commit is contained in:
2014-08-13 16:06:16 +02:00
parent 3fc7030002
commit d6e7c4998f
7 changed files with 10 additions and 25 deletions
-12
View File
@@ -2,17 +2,5 @@ class OrderSerializer < Qwaiter::Serializer
embed :ids, include: true
attributes :state, :list_id, :section_id, :table_id #, :price
# todo, put this logic in Ember
#def product_orders
#@product_orders ||= object.product_orders.include_relation(:product) .map do |product_order|
#{product_name: product_order.product.name, id: product_order.id, quantity: product_order.quantity, price: product_order.price}
#end
#end
# todo, put this logic in Ember
#def price
#product_orders.inject(0){|sum, po| sum + po[:quantity] * po[:price]}.round(2)
#end
has_many :product_orders
end