13 Mar
2008

#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 Feed

Add Comment

*
* (won't be displayed)

(Use Markdown syntax)