Extract find conditions from array

Cayce Balara wrote:

Using an "in" clause should accomplish the same thing:
            :select => 'DISTINCT contact_id',
            :conditions => ['list_id in ?', "('" + params[:joblist][:list_id].join("','") + "')"])

Also no testing, but I believe Rails will do the joining for you (which is partly why his original attempt resulted in the way it did). So the above code can be simplified to:

Contact_List.find :all, :select => 'DISTINCT contact_id',
   :conditions => ['list_id IN (?)', params[:joblist][:list_id]]