title: rails not making the link between dynamically added nested form and parent
body: <p>I've got a form 'tasks' and I am dynamically adding a child 'steps' form.</p>
  <p>The 'steps' is added through a javascript call to render('steps/form').</p>
  <p>The form loads fine, but when submitting the tasks form, the added step is not put into the database.</p>
  <p>I assume this is because I'm not linking the two forms together, but I'm not entirely sure.</p>
  <p>My code is
  Tasks/new.html.erb</p>
  <pre>
  &lt;%= form_for @task, :html=&gt;{:multipart=&gt;true} do |f| %&gt;
    &lt;%= f.label :task_name %&gt;
    &lt;%= f.text_field :task_name %&gt;
    
  &lt;%= link_to "Add Step", @step, :remote=&gt;true, :class=&gt;'addStep %&gt;
  &lt;%= f.submit %&gt;
  &lt;% end %&gt;
  
  &lt;% content_for(:js) do %&gt;
     $('a.addStep').click(function(){
        $('div#newStep').append("&lt;%= escape_javascript(render('steps/form'))%&gt;");
     });
  &lt;% end %&gt;
  </pre>
  <p>the steps/_form.html.erb is</p>
  <pre>
  &lt;p class="fields"&gt;
     &lt;%= fields_for :steps do |builder| %&gt;
     &lt;%= builder.label :title %&gt;
     &lt;%= builder.text_field :title %&gt;
  &lt;% end %&gt;
  </pre>
  <p>I believe the problem is that i'm not passing 'f' or 'task' into the 'step' form, but I couldn't figure out how to do that.</p>