title: Modify behavior of named route in Rails 3
body: <p>In my rails blog I'm writing I want the "show" route for posts to always have the form of:</p>
  
  <blockquote>
    <p>/year/month/day/title</p>
  </blockquote>
  
  <p>Currently I can accomplish this using a generic match:</p>
  
  <pre><code>match "/:year/:month/:day/:url_title", :to =&gt; "posts#show", :constraints =&gt; {:year =&gt; /(19|20)\d\d/, :month =&gt; /[01]?\d/, :day =&gt; /[0-3]?\d/}
  </code></pre>
  
  <p>Where my model is responsible for converting the title into a hyphen delimited string.</p>
  
  <p>However, I need a way to integrate this behavior into the resource routing so that my post_path methods will continue to work - preferably by just passing in a post object.</p>
  
  <p>I'm wondering if there's some way I can use the :as option to set the route, or do it with a block.</p>