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 sorts in the wrong order so that the result
is x DESC.  The sql generated is
SELECT 'items'.* FROM 'items' ORDER BY id DESC, id ASC
Which results in descending order (SQL is rather non-intuitive here).

One result is that it is not possible (as far as I can see) to
override a default or named scope that applies a sort order.

Perhaps I am missing something obvious.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to