title: undefined method `session' for ApplicationController:Class
body: <p>I am practicing with rails and I was in the topic of "session" and I get the message 
  "undefined method `session' for ApplicationController:Class"<br/></p>
  
  <p>please help me<br/></p>
  
  <p>this is the code
  <em>*</em>(controller aplication)</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    session :session_key =&gt; 'ruby_cookies'
  end
  </code></pre>
  
  <p><em>*</em>(controller when I want to create the cookies)</p>
  
  <pre><code>class RegistroController &lt; ApplicationController
    def index
    end
  
    def login
      if request.post?
        p_user = User.new(params[:user])
        user   = User.find_by_nombre_and_password(p_user.nombre, p_user.password)
        if user
          session[:user_id] = user.id
          flash[:notice]    = "se ha identificado correctamente"
          redirect_to home_url
        else
          flash[:notice] = "se incorrecto psps"
          redirect_to login_url
        end
      end
    end
  
    def logout
      session[:user_id] = nil
      flash[:notice] = "adios sayonara"
      redirect_to home_url
    end
  end
  </code></pre>