Ruby on Rails has a good support for Postgres Array type. I really like using this feature when creating a separate database table sounds like over-engineering. In this short post I want to share my solution for the following problem: âfind a record for which any of its tags contains a given stringâ. Letâs use Book model with categories array field as an example. We start by generating a migration
{{#tags}}- {{label}}
{{/tags}}