On 18 Nov 2009, at 17:11, Nicholas Henry wrote:

> Add a position column to your table and create a default scope for it.
>
> default_scope :order => 'position'

Do remember that (currently) Rails isn't smart enough to override the  
parameters in other named scopes:


default_scope :conditions => {:active => true}

named_scope :inactive, :conditions => {:active => false}

Forget it, doesn't work. Query resolves to SELECT * from table WHERE  
active=true AND active=false


Best regards

Peter De Berdt

--

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=.


Reply via email to