Quoting Ryan Ororie <email@example.com>:
I'm doing some editing on an existing rails app and this view;
_tour_listing.html.erb looks like this:
My question is with the render :partial => etc... line. I need to find
away to sort the data that is getting spit out by a specific field, how
would I do that?
Sort it in the controller or model, wherever the find() is. Often:
@upcoming_tour_requests = TourRequests.find(:all, :order => 'date')
Anything SQL accepts can go in the :order value, 'date DESC', 'id', etc.
Another point, blank? is for strings, empty? is standard Ruby for arrays.