title: Ruby on rails session doesn't work
body: <p>I'm using the session hash in rails, it works well only one time when the login action is done and it renders another page. The name of the user appears in that rendered page only that time, if I move to another page the name disappears. The section where the name of the user appears is in the layout.</p>
  
  <p>Here is my session controller:</p>
  
  <pre><code>class SesionController &lt; ApplicationController
  
    def new
      @admin = Admin.find_by({"usuario" =&gt; params[:usuario], "password" =&gt; params[:password]})
      if @admin then
        session[:usuario] = @admin.id
        session[:nombres] = @admin.nombres + " " + @admin.apellidos
  
        @usuario = session[:nombres]
        @titulo = 'Panel De Control'
        @panel_activo = 'active'
        render :'admin/panel'
      end
    end
  
    def destroy
    end
  
  end
  </code></pre>
  
  <p>and this is the controller of the page that is rendered and not showing the name of the user:</p>
  
  <pre><code>class AdminController &lt; ApplicationController
    def panel
      @usuario = session[:nombres]
      @titulo = 'Panel De Control'
      @panel_activo = 'active'
    end
  end
  </code></pre>
  
  <p>Hope you can help me.</p>
  
  <p>..........</p>
  
  <p>I comented the line of CSRF protection like this:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    # Prevent CSRF attacks by raising an exception.
    # For APIs, you may want to use :null_session instead.
    #protect_from_forgery
  end
  </code></pre>
  
  <p>and now it works... any reason?</p>