sorting the children of an object

You can actually do a find like such:

elements = area.elements.find(:all, :order => "name")

and it will automatically scope only to elements in the area. Still a
'query', but a very simple one.

Michael

you can also sort through the association

has_many :elements, :order => :position

so area.elements will always be sorted.

They are negligibly different in terms of efficiency. The
has_many :elements, :order => :name has a simplicity that I like, I
would go with that one.

Michael Bleigh
michael@intridea.com