title: Rails 4 form for multiple models
body: <p>I have 3 types of references <code>fea_ref</code>, <code>se_ref</code>, <code>te_ref</code>. </p>
  
  <p>I wanted to make a rails form_for called <code>_referenceform.html.erb</code> that takes a parameter (either <code>@fea_ref, @se_ref, @te_ref</code>) and create a new one via the the form.</p>
  
  <p><strong>fea_refs/_new.html.erb</strong></p>
  
  <pre><code>&lt;% render 'referenceform', :object =&gt; @fea_ref %&gt;
  </code></pre>
  
  <p><strong>application/_referenceform.html.erb</strong></p>
  
  <pre><code>&lt;%= form_for @object, remote: true, do |f| %&gt; 
    ... 
  &lt;% end %&gt;
  </code></pre>
  
  <p>When I hit save and close the modal to create the new fea_ref, I get an error saying,</p>
  
  <blockquote>
    <p>param can't be empty or nil, @fea_ref</p>
  </blockquote>
  
  <p>What could I be missing? Any guidance would be appreciated.</p>
  
  <p><strong>EDITED</strong>: I also tried </p>
  
  <pre><code>&lt;% render 'referenceform', :object =&gt; FEARef.new %&gt;
  </code></pre>
  
  <p>to no avail.</p>