thanks for the suggestions

attributes is a self inherited table
so i need to get them i order of top level and down
this is part of my current solution

has_many :objects_attributes do
    def top_level
      all(:joins => :attribute, :conditions => "attributes.parent_id
is null")
    end

    def children(id)
      all(:joins => :attribute, :conditions => ["attributes.parent_id
= ?", id])
    end
end

this allows me to access all fields in order desired
thanks for your help

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to