P
Paulo Carvalho
Hello
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?
thanks
regards.
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?
thanks
regards.