I'm not sure how to proceed. I've got it to work the way I said
earlier, but it's making seperate queries for every attribute.

@attributes is generated by: @attributes = @root.self_and_descendants

First, I want to get the root item and descend from there, so in
attribute_tree:

<%= render :partial => 'attribute_row', :locals => {:attribute =>
@attributes.root} -%>

And then I cycle through its children. But for every child request it
generates a query. So, what am I doing wrong? How to get the query
results in the memory and retrieve my objects from there?
--~--~---------~--~----~------------~-------~--~----~
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