I'm looking for a way to find all entries in a database containing a specific string. I know it's possible to iterate over every entry and see if a string matches but with a growing database i'd rather not do that. I'm wondering if there is a Rails way of doing it. something like
Table.where("content containsWord ?", "string")
So a function find all records containing a specific string. Does anyone know a way to do this?
update
duplicate of Rails: How to find_by a field containing a certain string