Re: [Rails] Current situation with chained order scopes

2011-02-17 Thread Colin Law
On 16 February 2011 19:45, Julian Leviston wrote: > Actually it's doing multiple field ordering... It's best to think of the > orders as compounding not replacing each other. Easiest to see if you have > two different cols rather than the same one... For example created_at desc, > name asc will

Re: [Rails] Current situation with chained order scopes

2011-02-16 Thread Julian Leviston
Actually it's doing multiple field ordering... It's best to think of the orders as compounding not replacing each other. Easiest to see if you have two different cols rather than the same one... For example created_at desc, name asc will sort on creation date and then name... So for all records

[Rails] Current situation with chained order scopes

2011-02-16 Thread Colin Law
I have found various blogs and comments on the issue of merging order scopes but have not been able to determine whether the current situation is regarded as satisfactory. Using Rails 3.0.4, the particular case I am considering is Item.order( 'x DESC').order('x ASC') This appears to merge the sort