In a table there is column called village which is text datatype. Now my question is few records will have 1,2 under village column some records will have only 2 or 1. when I do query I should be able to select those records which has 1,2 . If I want to select all the records of village(2). How can I do this in rails query.
Tried with Like and IN (?) in query but did not work
City.find(:all, :conditions => [“village LIKE ?”,2])
City.find(:all, :conditions => [“village IN (?)”,2])
as it is text datatype and if I pass 1,2 I am able to get the records but while passing single value like 1 or 2
Kindly suggest how to get it
Thanks in advance