foodcourt apis for app
This commit is contained in:
15
app/views/api/orders/_order.json.jbuilder
Normal file
15
app/views/api/orders/_order.json.jbuilder
Normal file
@@ -0,0 +1,15 @@
|
||||
if order
|
||||
json.order_id order.order_id
|
||||
|
||||
json.date order.date.try(:utc)
|
||||
|
||||
json.source order.source
|
||||
|
||||
json.customer_id order.customer_id
|
||||
|
||||
json.customer_name order.try(:customer).try(:name)
|
||||
|
||||
json.order_by order.waiters
|
||||
|
||||
json.order_items order.order_items, partial: "api/order_items/order_item", as: :order_item
|
||||
end
|
||||
Reference in New Issue
Block a user