title: Rails routes /name instead of /users/:id
body: <p>I've completed Hartl's tutorial and am trying to create vanity URLs to my twitter clone in the same way twitter has, e.g. www.twitter.com/realDonaldTrump</p>
  
  <p>I've managed to get my URLs to look like /users/:slug. 
  Wondering - how do I get it so it's just /:slug?</p>
  
  <p>Here's what I've done so far:</p>
  
  <p>1.In my User model, there's no column for 'username', so I used 'name' instead.</p>
  
  <p>2.Generated new migration to add a slug column to User model DB.</p>
  
  <p>3.Plugged into rails console to add slugs for all users by typing:</p>
  
  <pre><code>User.all.each do |user|
    user.slug = user.name.downcase.parameterize
    user.save
  end
  </code></pre>
  
  <p>4.Configured UsersController show action to:</p>
  
  <pre><code>def show
    @user = User.find_by_slug(params[:id])
    @microposts = @user.microposts.paginate(page: params[:page])
    redirect_to root_url and return unless @user.activated?
  end
  </code></pre>
  
  <p>Now that I've configured it so it shows /users/:slug, how do I change it so it's just /:slug?</p>