title: How to create app-wide slug routing for Rails app?
body: <p>I have a number of different models in the Rails app I'm working on.  I've seen a number of sites use an app-wide slug routing approach.  What do I mean by this?</p>
  
  <pre><code>http://example.com/nick-oneill &lt;-- This points to a User object
  http://example.com/facebook    &lt;-- This points to a Company object
  http://example.com/developers  &lt;-- This points to the users#index page
  </code></pre>
  
  <p>I'm aware of to_param and creating reader-friendly slugs within apps, however I'm not aware of an approach to have root-level slugs for a variety of objects.  You can think of this being similar to Facebook's Graph API: there are different object types, but all of them exist at <a href="https://graph.facebook.com/object-id">https://graph.facebook.com/object-id</a></p>
  
  <p>Any insight would be much appreciated!</p>