title: customize rails url with username
body: <p>I want to copy the twitter profile page and have a url with a username "<a href="http://www.my-app.com/username" rel="nofollow noreferrer">http://www.my-app.com/username</a>" and while I can manually type this into the address bar and navigate to the profile page I can't link to the custom URL.</p>
  
  <p>I think the problem is in the routes - here's the code in my routes.rb</p>
  
  <pre><code>map.connect '/:username', :controller =&gt; 'users', :action =&gt; 'show'
  </code></pre>
  
  <p>Also, I have <code>Question</code> and <code>Answer</code> models and I want to link to them with the customized URL like so:</p>
  
  <p><a href="http://www.my-app.com/username/question/answer/2210" rel="nofollow noreferrer">http://www.my-app.com/username/question/answer/2210</a></p>