This repository was archived by the owner on Sep 21, 2020. It is now read-only.

Description
When I embed a value directly into a query as so:
Bid.where("miscellaneous @> ('model_number=>ABC-123')")
SELECT "bids".* FROM "bids" WHERE (miscellaneous @> ('model_number=>ABC-123'))
the query works. But when I try to interpolate with a ? it adds an extra set of single quotes which raises an error:
Bid.where("miscellaneous @> ('model_number=>?)", 'ABC-123')
SELECT "bids".* FROM "bids" WHERE (miscellaneous @> ('model_number=>'ABC-123''))
PG::SyntaxError: ERROR: syntax error at or near "ABC"
What am I missing?