title: Devise - remember me not working? LocalHost Issue?
body: <p>I'm using devise with my rails 3 app. For some reason the sign in with Remember Me is not working.</p>
  
  <p>Could this be due to testing on localhost:3000 ?</p>
  
  <p>in devise.rb, I have the following set:</p>
  
  <pre><code>config.remember_for = 2.weeks
  </code></pre>
  
  <p>In the logs, when I post a signin I see:</p>
  
  <pre><code>Started POST "/users/sign_in" for 127.0.0.1 at Thu May 12 20:53:04 -0700 2011
    Processing by SessionsController#create as HTML
    Parameters: {"signIn"=&gt;"LOG IN", "authenticity_token"=&gt;"GR09TIq4uSbu6UWxDRhpfQeLWp7qtJTxkCFksLmFzdE=", "utf8"=&gt;"✓", "user"=&gt;{"remember_me"=&gt;"on", "password"=&gt;"[FILTERED]", "email"=&gt;"xxxx@xxxxxxx-inc.com"}}
  </code></pre>
  
  <p>Is there anything wrong there?</p>
  
  <p>I also have the following in my sessions_controller.rb</p>
  
  <pre><code>class SessionsController &lt; Devise::SessionsController
  
    prepend_before_filter :require_no_authentication, :only =&gt; [ :new, :create ]
    include Devise::Controllers::InternalHelpers
  
    # GET /resource/sign_in
    def new
      clean_up_passwords(build_resource)
      render_with_scope :new
    end
  
    # POST /resource/sign_in
    def create
      resource = warden.authenticate!(:scope =&gt; resource_name, :recall =&gt; "new")
      #set_flash_message :notice, :signed_in
      sign_in_and_redirect(resource_name, resource)
    end
  
    # GET /resource/sign_out
    def destroy
      #set_flash_message :notice, :signed_out if signed_in?(resource_name)
      sign_out_and_redirect(resource_name)
    end
  
    protected
  
    def after_sign_in_path_for(resource)
      if resource.is_a?(User) &amp;&amp; resource.banned?
        sign_out resource
        flash[:error] = "This account has been suspended."
        root_path
      else
        super
      end
    end
  
  
  end
  </code></pre>
  
  <p>Any ideas why signing in and remembering is not working? Thanks</p>