title: Rails url_for named route with optional parameters
body: <p>If I have a route with optional parameters, as follows:</p>
  
  <pre><code>match 'comments/new(/:post_id/(/:parent_id))' =&gt; 'comments#new'
  </code></pre>
  
  <p>Is there a clean way to create the links for that named route? Obviously, I can do: </p>
  
  <pre><code>link_to "New Comment", "comments/new/#{post_id}"
  </code></pre>
  
  <p>But I think there is a cleaner way. I just cannot find any reference in the url_for or link_to documentation. </p>