From: Farrel Lifson Date: 2007-10-17T23:57:53+09:00 Subject: Re: sort_by On 17/10/2007, Paulo Carvalho wrote: > I have a list of rows which I want to order by a column. > I make it with > @values_ordered = @values.sort_by(&:id_column) > > What if I want to inverse the order (like order by x desc in SQL) > > How could I do that using sort_by? is that possible? values_orderd = @values.sort_by{|value| -value.id_column}