search for: latest_history

Displaying 1 result from an estimated 1 matches for "latest_history".

2007 Apr 04
4
Order a find using a has_many association
...> <td><%= sales_order.description %></td> <td class="right_align"><%= sprintf("%#1.2f", sales_order.amount) %></ td> <td><%= sales_order.ship_date.strftime(''%m/%d/%y'') %></td> <td><%= sales_order.latest_history.nil? ? "&nbsp;" : sales_order.latest_history.route.name %></td> The problem is that this list is not in the order that I need it to be. I can order it by any column in the sales_orders table, but I need to order it by latest_history.route.name I don''t know how to...