#find supports select in conditions in just the way you would expect, so
Model.find(:all, :conditions => ["attribute IN (?)", [1,2,3]])
generates
SELECT * FROM models WHERE (attribute IN (1,2,3))
for MySQL.
#find supports select in conditions in just the way you would expect, so
Model.find(:all, :conditions => ["attribute IN (?)", [1,2,3]])
generates
SELECT * FROM models WHERE (attribute IN (1,2,3))
for MySQL.
Comments
Add Comment