diff options
author | HombreLaser <sebastian-440@live.com> | 2023-04-14 20:52:50 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-04-14 20:52:50 -0600 |
commit | 9607fcb5a9cdc7595633336881cc0dd8aa9fb8ca (patch) | |
tree | a03b7f31fdca2e531d082ac813dc341262631a85 /app/serializers | |
parent | 8fbeea986d06a0052ce0132717f22b6ff8bd1a04 (diff) |
Corrige errores de OrdersController
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/order_serializer.rb | 2 |
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 |