find( [1,2,3] ) find from array without raising error.

There may be an easier way, but something like this will do it:

   results = id_arr.collect {|i| Model.find_by_id(i)}.compact

or, more efficient, since it makes only one query:

   results = Model.find :all, :conditions => ["id in (#{id_arr.collect
{'?'}.join(',')})", *id_arr]