title: Dynamically add and remove nested form fields
body: <p><img src="https://cl.ly/3g3c22360j3o0H3X0W1n/Screen_shot_2011-09-01_at_11.12.53.png" alt="The form view"></p>
  
  <p>I've been following along with the out-of-date railscasts: </p>
  
  <p><a href="http://railscasts.com/episodes/197-nested-model-form-part-1" rel="nofollow noreferrer">http://railscasts.com/episodes/197-nested-model-form-part-1</a></p>
  
  <p><a href="http://railscasts.com/episodes/197-nested-model-form-part-2" rel="nofollow noreferrer">http://railscasts.com/episodes/197-nested-model-form-part-2</a></p>
  
  <p>I've been trying to make the code work in Rails 3 but unfortunately I have only been able to make the remove function work intermittently (I broke the code elsewhere). </p>
  
  <p>I've also tried playing around with the 'nested_form' gem which seems to work great in a squeaky-clean scaffold-generated environment but doesn't seem to slot into my current project neatly. Furthermore, I really want to understand what's going on behind the scenes rather than get a quick gem-fix on this one as it is a core part of my app.</p>
  
  <p>Any tips on dynamically adding or removing nested fields with JQuery or some decent helper methods would be really, really appreciated.</p>