I have a table with 2 columns. "car" "year". I want to do a collect into an array of all cars and then sort them by year. How do I do that?
<% @cars_pre = Car.find(:all) %>
<% @cars = @cars_pre.collect {|x| x.car} %>
I need the steps to order the @cars array by year, keep in mind I am not keeping year values in the @cars array, just cars. Thanks in advance.