Overview of the things to change when using username slug/short URL in rails
===

I'm pretty new at rails, so forgive me if I'm overlooking simple things or the rails way.  My objective is to completely replace URLs of the form 

`/users/1`

with

`/username`

for all purposes.  (I think exposing IDs scaffolding publicly is like walking around with a bone sticking out of your arm.)  But implementing seems a little more complicated than I expected.  This seems to change the entire way rails indexes and looks up users, rather than just substituting a lookup method.

Although I've kind of gotten this to function using the `to_param` override in my `user.rb` file, I've read this means I'll have [indexing][1] [problems][2] [down][3] the road when using `params([:username])`, and I'm not sure how it will impact my 

(a) session model at new user creation, and 

(b) @User usage in the user/show.html.erb file.

So, I've either consulted the following pages (or asked the questions):

 - http://stackoverflow.com/questions/5611649/ruby-on-rails-routing-matching-username
 - http://stackoverflow.com/questions/2269885/username-in-url-with-rails-routes
 - http://stackoverflow.com/questions/11048063/routing-in-rails-making-the-username-an-url
 - http://stackoverflow.com/questions/5204057/routing-error-with-username-in-url
 - http://stackoverflow.com/questions/11514723/correct-routing-for-short-url-by-username-in-rails/11514977#comment15244810_11514977
 - http://stackoverflow.com/questions/6461814/rails3-clean-url-friendly-id-sessions

The major issues I'd like to understand from this question:

1. What functionality do I lose by transitioning to this?  That is, what things currently "just work" in rails that I'll have to address and rewrite if I pursue this replacement?
2. As a practice, is this something better to replace with [friendly_id][4]?  My concern here is that creating a slug column in my DB identical to the username seems a little non-DRY and makes me uncomfortable, and I'd rather avoid dependencies on external gems where possible.
3. What does my users#show need to look like?  Currently, I'm getting the following error:


    `NoMethodError in Users#show
    
    Showing /app/views/users/show.html.erb where line #1 raised:
    
    undefined method `username' for nil:NilClass
    Extracted source (around line #1):
    
    1: <h2><%= @user.username %></h2>
    2: 
    3: <!-- 
    4: 

    Request
    
    Parameters:
    
    {"username"=>"signout"}`



  [1]: http://apidock.com/rails/ActiveRecord/Base/to_param
  [2]: http://blog.nhocki.com/2012/01/22/beautiful-urls-in-rails-the-easy-way
  [3]: http://stackoverflow.com/questions/5611649/ruby-on-rails-routing-matching-username
  [4]: http://railscasts.com/episodes/314-pretty-urls-with-friendlyid
