Assume you have a Bicycle model with an array attribute components. To find all bicyles which have the component disc_brakes in the components array, use the following query:
Bicyle.where("'disc_brakes'=ANY(components)")Aug 15, 2025
Assume you have a Bicycle model with an array attribute components. To find all bicyles which have the component disc_brakes in the components array, use the following query:
Bicyle.where("'disc_brakes'=ANY(components)")