Skip to content

Commit

Permalink
Convert Active Record Relation to Array in Products Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
sentry-autofix[bot] authored Jan 3, 2025
1 parent 616cbc7 commit 8fb085a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def index
span_products_slow_db = transaction.start_child(op: "custom.reviews_slow_db_call")
prod_slow["pg_sleep"] = ""
prod_slow["reviews"] = []
prod_slow["reviews"] = Reviews.select("id, productid, rating, customerid, description, created, Null as pg_sleep").where("productid="+prod_slow.id.to_s)
prod_slow["reviews"] = Reviews.select("id, productid, rating, customerid, description, created, Null as pg_sleep").where("productid="+prod_slow.id.to_s).to_a
span_products_slow_db.finish
end

Expand Down

0 comments on commit 8fb085a

Please sign in to comment.