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
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
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
3 matches
Mail list logo