title: Rails 3 resource routing without an id
body: <p>I am creating a blog application on Rails 3, and I want to override the default show route generated for a post by doing </p>
  
  <pre><code>resources :posts, :except =&gt; :show
  </code></pre>
  
  <p>Which generates, for the show route (had I not excluded it),</p>
  
  <pre><code>/post/:id
  </code></pre>
  
  <p>I want my route to look like this instead, where url_title is a string generated by my model on before_save, where it removes non alphanumeric characters and replaces spaces with hyphens.</p>
  
  <pre><code>/:year/:month/:day/:url_title
  </code></pre>
  
  <p>I'm trying to accomplish this with this bit of code:</p>
  
  <pre><code>match "/:year/:month/:day/:url_title", :to =&gt; "posts#show", :as =&gt; :post
  </code></pre>
  
  <p>In theory this should allow me to call post_path(@post) (where @post is an instance of my post class), and it should be able to sort this route out, and it <em>almost</em> works. </p>
  
  <p>The only problem is that it tries to substitute the id of the post in for the year. The other fields fill in correctly. I think this is happening because rails has some default behavior that makes it really, really want to have the id in the url, and it doesn't trust me to use my own unique identifier (post.url_title, in this case).</p>
  
  <p>I could be wrong about that though. Anyone have experience with this kind of routing, or know what's up?</p>