Let's say there is a model called User. That has the attribute :hobbies.
user = User.first
user.hobbies
=> ["Bowling", "Cooking", "Knitting"]
If I wanted to use a .where searching for the :hobbies attribute, how would I do that? I'm using postgresql, and
:hobbies, :text, array:true
User.where(hobbies: "Anything I put here, string array, hash") throws the error
ActiveRecord::StatementInvalid: PG::InvalidTextRepresentation: ERROR: malformed array literal: