title: No route matches {:action=>"show", :controller=>"users"} when clicking the link to root_path - user is signed in
body: <p>I am following Michael Hartl's tutorial and am currently on chapter 9 - I am using Rails 3.2.12 and Ruby 1.9.3p362</p>
  
  <p>There is only one test that is not passing:</p>
  
  <pre><code>1) Authentication authorization as wrong user visiting Users#edit page 
       Failure/Error: before { visit edit_user_path(wrong_user) }
       ActionView::Template::Error:
         No route matches {:action=&gt;"show", :controller=&gt;"users"}
  </code></pre>
  
  <p>However, if I a user is signed in, he cannot visit any of the static pages! Attempting to do so results in the same error:</p>
  
  <pre><code> No route matches {:action=&gt;"show", :controller=&gt;"users"}
  </code></pre>
  
  <p>There are no filters on the static_pages controller. </p>
  
  <p>Here is the session_helper:</p>
  
  <pre><code>module SessionsHelper
  
    def sign_in(user)
      cookies.permanent[:remember_token] = user.remember_token
      self.current_user = user
    end
  
    def sign_out
      self.current_user = nil
      cookies.delete(:remember_token)
    end
  
    def current_user=(user)
      @current_user = user
    end
  
    def current_user
      @current_user ||= User.find_by_remember_token(cookies[:remember_token])
    end
  
    def current_user?(user)
      user == current_user
    end
  
    def signed_in?
      !current_user.nil?
    end
  
  end
  </code></pre>
  
  <p>And here is the UsersController:</p>
  
  <pre><code>class UsersController &lt; ApplicationController
    before_filter :signed_in_user, only: [:edit, :update]
    before_filter :correct_user, only:[:edit, :update]
  
    # GET /users
    # GET /users.json
    def index
      @users = User.all
  
      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @users }
      end
    end
  
    # GET /users/1
    # GET /users/1.json
    def show
      @user = User.find(params[:id])
  
      respond_to do |format|
        format.html # show.html.erb
        format.json { render json: @user }
      end
    end
  
    # GET /users/new
    # GET /users/new.json
    def new
      @user = User.new
  
      respond_to do |format|
        format.html # new.html.erb
        format.json { render json: @user }
      end
    end
  
    # GET /users/1/edit
    def edit
  
    end
  
    # POST /users
    # POST /users.json
    def create
     @user = User.new(params[:user])
      if @user.save
        sign_in @user
        flash[:success] = "Welcome to The New Outfit Project!"
        redirect_to @user
      else
        render 'new'
      end
    end
  
    # PUT /users/1
    # PUT /users/1.json
    def update
  
      if @user.update_attributes(params[:user])
         flash[:success] = "Profile updated"
        sign_in @user
        redirect_to @user 
      else
        render 'edit'
      end
    end
  
    # DELETE /users/1
    # DELETE /users/1.json
    def destroy
      @user = User.find(params[:id])
      @user.destroy
  
      respond_to do |format|
        format.html { redirect_to users_url }
        format.json { head :no_content }
      end
    end
  
    private
  
      def signed_in_user
        redirect_to signin_url, notice: "Please sign in." unless signed_in?
      end
  
  
      def correct_user
        @user = User.find(params[:id])
        redirect_to(root_url) unless current_user?(@user)
      end
  
  end
  </code></pre>
  
  <p>Routes.rb</p>
  
  <pre><code>Heart::Application.routes.draw do
    root :to =&gt; 'static_pages#home'
  
    get "static_pages/home"
  
    get "static_pages/help"
  
    get "static_pages/terms"
  
    get "static_pages/howitworks"
  
    get "static_pages/contact"
  
    get "static_pages/privacy"
  
    match '/help', to: 'static_pages#help'
    match '/terms', to: 'static_pages#terms'
    match '/privacy', to: 'static_pages#privacy'
    match '/howitworks', to: 'static_pages#howitworks'
    match '/contact', to: 'static_pages#contact'
    match '/signup',  to: 'users#new'
  
    resources :outfits
  
  
    resources :users
  
    resources :sessions, only: [:new, :create, :destroy]
  
    match '/signup',  to: 'users#new'
    match '/signin',  to: 'sessions#new'
    match '/signout', to: 'sessions#destroy', via: :delete
  </code></pre>
  
  <p>I am not sure what I have done to cause this behavior.</p>
  
  <p>Thanks</p>
  
  <p>Sam</p>
  
  <p>Editing - </p>
  
  <pre><code>Started GET "/" for 127.0.0.1 at 2013-10-25 08:36:09 -0500
  Processing by StaticPagesController#home as HTML
    Rendered static_pages/home.html.erb within layouts/application (1.3ms)
    User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`remember_token` = 'BfOZrKGkLDUxjjj6W4MdPw' LIMIT 1
  Completed 500 Internal Server Error in 21ms
  
  ActionController::RoutingError (No route matches {:action=&gt;"show", :controller=&gt;"users"}):
    app/views/layouts/application.html.erb:35:in `_app_views_layouts_application_html_erb___2220788467796044097_70169256016500'
  </code></pre>