title: Ruby on Rails - Render form for model
body: <p>when I render an partial for my model I'm using:</p>
  
  <pre><code>&lt;%= partial @my_model %&gt;
  </code></pre>
  
  <p>Automatically it looks for the file ..view/my_models/_my_model.html.erb
  I really like this notation because it feels the right way!</p>
  
  <p>My Problem:
  Now I want a notation to automatically look up for the edit partial.
  Is there a way? Until now I used</p>
  
  <pre><code>&lt;%= partial 'edit' %&gt;
  </code></pre>
  
  <p>This is ok, but I have a lot of subclasses for my model and I liked the way that it automatically looks up in the right subclasses view folder for the template.
  Until know I have to look for the class for my model and then call</p>
  
  <pre><code>&lt;% if @my_model.class == FirstSubClass %&gt;
      &lt;%= partial 'firstsubclasses/_edit.html.erb' %&gt;
  &lt;% elsif @my_model.class == SecondSubClass %&gt;
      &lt;%= partial 'secondsubclasses/_edit.html.erb' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I prefer one line :) Any ideas?</p>