I am having a issue using active record conditions in rails 2 with postgres. My problem is when ever I try to use this query (I am using geokit, but that is not the issue)
Table.all(:conditions => ["id IN (?)", id_array.join(",")], :origin => origin, :within => 20)
I get this problem:
ActiveRecord::StatementInvalid: PG::Error: ERROR: invalid input syntax for integer: "21,28"
LINE X: ...OM "tables" WHERE (((id IN (E'21,28...
Why is it putting the "E'" in there and how to I get rid of it?