title: How to get at the underlying object inside a Rails form or field_for block?
body: <p>I can't figure-out how to get at the underlying object in a form_for or field_for block.</p>
  
  <p>What I'd like to do is something like:</p>
  
  <pre><code>&lt;% f.fields_for :children do |child_form| %&gt;
    &lt;%= render :partial =&gt; "#{child_form.underlying_object.class.name.downcase}" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and :children is a polymorphic has_many association.</p>
  
  <p>Suggestions?</p>