Displaying 1 result from an estimated 1 matches for "sorted_array".
2006 Apr 13
3
Sorting an array of models
I have a model, listing, which belongs_to one or more categories. I need 
the user to be able to search for categories by name (which I can do) 
and have it return all the listings that belong to those categories. 
This I can do.
However, what I need to do is take that list of listings and sort them 
by one of their fields. This is a bit more complicated, without needing 
to sort I could just do: