I have this simple named_scope that returns all Events after a given
id:

 named_scope :recent_by_id, lambda {|id| {
    :conditions => ['id > ?', id], :order => 'id ASC'
}}

The problem is that named_scope returns a query with an order by
clause containing created_at first:
ORDER BY created_at DESC, id ASC

How do I get named_scope to ignore the created_at and simply give me a
query sorted by id?

best,

- Matt
--~--~---------~--~----~------------~-------~--~----~
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