"slindsey3000" <[email protected]> wrote in message news:ac0ebe39-e6e3-48df-8ed9-9b4ab029c...@h11g2000vbo.googlegroups.com...
I have had the worst time getting my forms to accept input for more
than one model.  I tried using accepts_nested, and other techniques
and finally got it all working.  But it was not fun. I never did get
accepts_nested working!


To help you get accepts_nested working, since that is so much easier than the alternatives if you can get it working, please watch the following railscast:
http://railscasts.com/episodes/196-nested-model-form-part-1

If you have a strong aversion to watching a screencast, you may instead substitue the asciicast:
http://asciicasts.com/episodes/196-nested-model-form-part-1

That should be enough to get accepts_nested_attributes_for working, at least in the way it was intended to work.

If you have further questions after watching that, please let us know.

The next railscast/asciicast covers a bit more of the topic, but is probably not relevant for your purposes, as it sounds like you plan on having only say a single subform per child model.

I hope that helps. If not please try following along with it, so you get confortable with how it is used in that case, and then ask any more specific questions.

Perhaps you want to post attributes for a parent model to a child model. That is tricker, and something we could help you with.


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

Reply via email to