I watched http://railscasts.com/episodes/73-complex-forms-part-1 and http://railscasts.com/episodes/74-complex-forms-part-2 but it didn’t seem to work for me when trying the code – my assumption is a lot has changed within rails since then. The second issue is I’m using JQuery.
Does anyone know of any tutorials online that might show an easier way to do this? I’ve already made one nested model form – so its really just the adding/removing fields dynamically part thats killing me.
Here’s a simple example that shows how to send out multiple invites from single page. Some little details are missing but it might be enough to help. You can add and remove fields from the view via some simple jQuery. This code could be adapted to any kind of nested model situation. Hope it helps! 🙂
InviteController.rb
User.rb
Invite.rb
new.html.erb
_invite.html.erb
application.js