summaryrefslogtreecommitdiff
path: root/app/serializers/order_serializer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/order_serializer.rb')
-rw-r--r--app/serializers/order_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/order_serializer.rb b/app/serializers/order_serializer.rb
index e6883bf..617918e 100644
--- a/app/serializers/order_serializer.rb
+++ b/app/serializers/order_serializer.rb
@@ -5,7 +5,7 @@ class OrderSerializer < BaseSerializer
attributes :public_id, :created_at
attribute :products do |object|
ProductSerializer.new(
- Product.joins(:product_order).select('products.*', 'product_orders.quantity AS quantity')
+ Product.joins(:product_orders).select('products.*', 'product_orders.quantity AS quantity')
.includes(picture_attachment: :blob).where('product_orders.order_id = ?', object.id)
).serializable_hash
end