title: Signing in a User (Ruby on Rails Tutorial Ch. 8)
body: <p>Why is the middle method necessary?  It seems to me like it's just an intermediary step to connect the first and third methods.</p>
  
  <pre><code>module SessionsHelper
  
    def sign_in(user)
      cookies.permanent[:remember_token] = user.remember_token
      self.current_user = user
    end
  
    def current_user=(user)
      @current_user = user
    end
  
    def current_user
      @current_user ||= User.find_by_remember_token(cookies[:remember_token])
    end
  end
  </code></pre>