Hi,

I am dealing with a situation where we have a lot of nested models: A
has many B's, which in turn have one C, and many D's, and so on and so
forth.

I'm trying to build a form to edit an A, where we want to pull in some
of the child models.   So far so good, as_fields_for does the trick in
our overridden partials.  Here's where I'm a bit stuck though: in the
case where A has many B's, with as_fields_for, displaying a table with
all of the B's, and allowing editing of them is not a problem.
However, with a has_many relationship, besides editing existing child
models, another possibility is adding on a new child model, and this
has been more problematic, since as_fields_for wants the id of the
object.

With a bit of trial and error, I found that HTML like this works to
create new records:

record[subsidiaries][new][description]

but am wondering if that's an ok thing to be doing.

Any advice, commentary, suggestions or pearls of wisdom are
appreciated!

Thank you,
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to