Re: [Rails] Sorting with related tables

2010-07-27 Thread Michael Pavling
On 27 July 2010 08:59, Mohammed Alenazi wrote: > Hi > I have two tables: users and tickets. A user has many tickets which is > defined in the model. I want to order the users based on the number of > tickets they have. What is the easiest way to do it in Rails without > writing to many SQL stateme

[Rails] Sorting with related tables

2010-07-27 Thread Mohammed Alenazi
Hi I have two tables: users and tickets. A user has many tickets which is defined in the model. I want to order the users based on the number of tickets they have. What is the easiest way to do it in Rails without writing to many SQL statements. -- You received this message because you are subscr