title: Rails Nested Form Object in other controller
body: <p>After trying to make this work for about 12 hours now, I have to turn to SO for salvation. Here's the scenario.</p>
  
  <p>I'm using zurb foundation 4, and am trying to make a reveal modal ajax form for a nested resource in my dashboard. </p>
  
  <p>I have the following nested resources:</p>
  
  <pre><code>  resources :lessons, only: [:index, :edit, :show] do
      resources :notes, only: [:new, :create, :edit, :delete]
    end
  </code></pre>
  
  <p>form at lessons/1/notes/new works fine.</p>
  
  <p>I have a table on my static_pages/home like so:</p>
  
  <pre><code>  &lt;table&gt;
      &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Student&lt;/th&gt;
        &lt;th&gt;Subject&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;
  &lt;% @lessons.each do |lesson| %&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;%= link_to lesson.student.name, lesson %&gt;&lt;/td&gt;
        &lt;td&gt;&lt;%= lesson.subject.name %&gt;&lt;/td&gt;
        &lt;td&gt;&lt;%= link_to 'make a note', new_lesson_note_path(lesson), "data-reveal-id"=&gt;"note-for" %&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p></p>
  
  <p>Under all my markup, I have the following form in a foundation reveal modal:</p>
  
  <pre><code>&lt;!--Reveal Form--&gt;
  &lt;div id="note-for" class="reveal-modal"&gt;
  &lt;% @lessons.each do |lesson| %&gt; &lt;--form now associated with proper object--&gt;
    &lt;%= form_for Note.new, :url =&gt; new_lesson_note_path(lesson) do |f| %&gt;
        &lt;div class="field"&gt;
          &lt;%= f.label :content %&gt;
          &lt;%= f.text_area :content %&gt;
        &lt;/div&gt;
        &lt;div class="actions"&gt;
          &lt;%= f.submit "Save", class: "small button"%&gt;
        &lt;/div&gt;
    &lt;% end %&gt;
    &lt;a class="close-reveal-modal"&gt;&amp;#215;&lt;/a&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Modal renders fine, submitting the form however throws the following error:</p>
  
  <pre><code>No route matches [POST] "/lessons/1/notes/new"
  </code></pre>
  
  <p>I'm seriously at a loss here, please help.</p>