title: How to create an "edit" url for a restful resource?
body: <p>In my partial template, there is a varible named "resource", it may be a question or an answer.</p>
  
  <p>I want to build a link to edit it, but when I use it, I don't know what it is, so I can't write:</p>
  
  <pre><code>&lt;%=link_to 'edit', edit_question_url(resource)%&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>&lt;%=link_to 'edit', edit_answer_url(resource)%&gt;
  </code></pre>
  
  <p>I wonder if there is such a method, say "url_for_edit()", can be used as:</p>
  
  <pre><code>&lt;%=link_to 'edit', url_for_edit(resource)%&gt;
  </code></pre>
  
  <p>Is there such a method?</p>