On 17 February 2011 00:53, Robert Pankowecki (rupert)
<[email protected]> wrote:
> If you want to change the order instead of adding another column to
> ordering list then there is reorder() method which is however
> deprecated in Rails 3.1 in favor of except(:order).order(new order
> here)

That is what I wanted, I had missed it previously.  So, to clarify for
anyone picking this up in the future, if we have
Items = Item.order( :id )
then we can say
items.except(:order).order( 'id DESC' )
to override the previous sort.

I have tried it in the console and it works as expected.

Many thanks

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