Kevin Burk wrote:

cart as a model, and that simply doesn't translate to what I'm doing. If "A" has many "B", and I have the model files set up correctly, I want to be able to view a full listing of the data in "A" AND also include all of the data from "B" using the "A_id" as the parameter all on the same page. Ultimately, I'll need a view that includes not only the "A" and "B" data, but also "C", "D", "E" etc....each of which uses the "A_id" to pull the data from the related tables-and the ability to show or hide each related table data section using AJAX.

Query wise, this is trivial..  for example:

  p = Person.find(:all, :include => [:friends, :parents, :children])

  where Person == A, Friend == B, Parent == C, Child == D, etc..

  Gets you all of the data you're talking about.

View+AJAX wise, yah.. you might want a hired tutor to help you. Would seem though, that you might be able (depending on the volume of data), to populate the entire document with all of the data, and simply show/hide divs based on what your user clicks. No?

--Steve

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to