Here are my models.
Restaurant has many patrons
patrons have many transactions
In controller index all patrons like
@pts = Restaurant.find(1).patrons
and in view I simply list the patrons attributes, inluding number of transaction per patrons like <% @pts.each do |p| <%= p.transactions.count %>
How would I order the resultset (@pts) by transaction count of each patron?
Thanks