I have a column set up like this in my table
add_column :logs, :names, :string, array: true
add_index :logs, :names, using: :gin
I have this query to search the table via the names column to return records that contain robert
Logs.where("? = ANY (names)", 'robert')
I am curious on how to search the table for multiple names. Something like this, but the below query does not work
Logs.where("? = ANY (names)", ['robert', 'bob'])
I want it to function to something similar like this, where I pass in an array and returns all records that match
User.where(id: [1,2,3,4])
I need it as an OR statement