Per section 2.2 of rails guide on Active Record query interface here:
which seems to indicate that I can pass a string specifying the condition(s), then an array of
Sounds like you're doing something like this:
Model.where("attribute = ? OR attribute2 = ?", [value, value])Whereas you need to do this:
#notice the lack of an array as the last argument Model.where("attribute = ? OR attribute2 = ?", value, value) Have alook at http://guides.rubyonrails.org/active_record_querying.html#array-conditions for more details on how this works.
Was really close. You can turn an array into a list of arguments with *my_list.
Model.where("id = ? OR id = ?", *["1", "2"])
OR
params = ["1", "2"]
Model.where("id = ? OR id = ?", *params)
Should work