title: Are params of a form available to helpers in rails 3?
body: <p>I was following Michael Hartl's tutorial to build a sign up form with login. I thought I would try and add a remember me check box to the login form and make it's value default at 0 and then 1 when checked.</p>
  
  <p>I added an if statement in my sessionshelper:</p>
  
  <pre><code>module SessionsHelper
  
    def login(user)
      if params[:remember_me]
      cookies.permanent.signed[:remember_token] = [user.id, user.password_salt]
      current_user = user
     else
      cookies[:remember_token] = [user.id, user.password_salt]
      current_user = user
     end
    end
  
    def current_user=(user)
      @current_user = user
    end
  
    def current_user
      @current_user ||= user_from_remember_token
    end
  
    def logged_in?
      !current_user.nil?
    end
  
    def logout
      cookies.delete(:remember_token)
      current_user = nil
    end
  
    private
  
    def user_from_remember_token
      User.authenticate_with_salt(*remember_token)
    end
  
    def remember_token
      cookies.signed[:remember_token] || [nil, nil]
    end
  
  end
  </code></pre>
  
  <p>....but for some reason when ever I log in with boxed checked or not checked the cookie expiry time and date is never set. It always says "At end of session" when I check cookie info in firefox. Am I missing something?</p>
  
  <p>my controller:</p>
  
  <pre><code>class SessionsController &lt; ApplicationController
  
    def new
  
    end
  
  
    def create
      user = User.authenticate(params[:session][:email], params[:session][:password])
      if user.nil?
        flash.now[:error] = "Invalid email password combination"
        render 'new'
      else
        login user
        redirect_to user
      end
    end
  
    def destroy
      logout
      redirect_to root_path
    end
  end
  </code></pre>
  
  <p>view:</p>
  
  <pre><code>&lt;%= form_for(:session, :url =&gt; sessions_path) do |f| %&gt;
    &lt;%= f.text_field :email, :placeholder =&gt; "Email" %&gt;      
    &lt;%= f.password_field :password, :placeholder =&gt; "Password" %&gt;     
    Remember me? &lt;%= f.check_box :remember_me, :value =&gt; 1 %&gt;
    &lt;%= f.submit "Log in", :id =&gt; "login_submit" %&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>Help is appreciated.</p>