On Jan 9, 2007, at 8:30 AM, Josselin wrote: > I can sort an array like that : > > results = rs.sort_by{|p| p.km} > > but I tried to add a scrond sorting criteria like that : > > results = rs.sort_by{|p| p.km, p.updated_at } results = rs.sort_by { |p| [p.km, p.updated_at] } Arrays can be sorted and will compare their contents in order, so this should do what you want. Hope that helps. James Edward Gray II