title: In Rails, what's the URL helper for an unknown model?
body: <p>I'm trying to get the path in Rails to a model that I don't necessarily know the class of in a rake task (so it's not in an .erb).</p>
  
  <p>I know that I can do this:</p>
  
  <pre><code>Rails.application.routes.url_helpers.&lt;model&gt;_path(model)
  </code></pre>
  
  <p>But what if I don't necessarily know the model? It seems not Rails-y to switch on the model.class or any other such inspection. I'm just looking for the default path or url to the model.</p>
  
  <p>Edit: To clarify what I mean by default path, it's the href you get when you do link_to; i.e., you can do this:</p>
  
  <pre><code>&lt;%= link_to "my model", @model %&gt;
  </code></pre>
  
  <p>without specifying a url helper like model_path. That's what I'm looking for.</p>