RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: biscuitvile
This was one of the first casts that got me into Railscasts so I'm glad to see an update.
Just a word of caution to new users of this technique: when you have a hammer everything can look like a nail. Dynamic nested forms like this are extremely powerful and can sometimes grant the user too many chances to input bad data.
If you find yourself needing complex validations to regulate the the data coming in from the form, a solution like this might not be what's in order and you might want to limit the scope of what is possible to do. Ryan's simple example here is spot on.
This dynamic nested form technique has worked wonders for me (Thanks, Ryan!) but I've been bitten by applying it to the wrong use cases-- use discretion when deciding on a UX.