jhaagmans wrote:
[...]
> I'm asking this because I don't get it. 

What don't you get?

[...]
> I think I can limit my model to just the acts_as_nested_set and make
> it belong to product, but how to load it up? Can I do
> @product_attributes = ProductAttributes.find(:all, :conditions =>
> { :product_id => @product.id } and use this collection somehow (how?)
> in my view?

Well, yes.  And as far as how you use the collection...it's just an 
array of records like any other.  I think you already know how to use it 
in the view. :)

> Or will I need the root element and descend from there?
> The documentation is just way too limited for me to understand. 

Have you read the InstanceMethods and ClassMethods rdoc?  They describe 
the extra finder methods that the class provides.  You may need to build 
the rdoc yourself or use rdoc.info , since I don't think the rdoc is on 
the Web.
> And
> how will the view part work? I need to actually have a root element
> including a <li> tag for a child which can have an <ul> tag -only- if
> it has children of its own.

You'll have to do that yourself, using the parent_id, lft, and rgt 
fields to determine the list nesting.  Again, awesome_nested_set does 
absolutely nothing with the view.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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-talk@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