Hello,

I'm using default_scope on some models to sort the records but the AS have a
issue with that.

For example, i have a model named Page:

class Page < ActiveRecord::Base
  default_scope :joins => :category, :order => 'categories.order ASC,
pages.order ASC'
end


When I access the list, the SQL generated is (order part): "ORDER BY
pages.id ASC, categories.order ASC, pages.order ASC"
But I don't setted the AS to sort by id. Well, this doesn't work.

It's a bug?


Thank you

-- 
Regards,

Gabriel Sobrinho
E-mail: [email protected]
Phone: +55 31 8775 8378

Don't print this e-mail. The nature is thankful and your money also.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to