I have a simple table with id and name fields and which has some
data which includes ? and '' characters. If I try to find the rows
which have these elements, the query fails with the following error:
irb(main):013:0* a = Person.find(:all, :conditions => ["name = ???"])
ActiveRecord::PreparedStatementInvalid: wrong number of bind variables
(0 for 3) in: name = ???
So my question is: is there any way to escape the query ? Or better
still, can I do the query without SQL (pure ruby) ?