Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9154845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:29:41+00:00 2026-06-17T12:29:41+00:00

I am building an app in which I would like the users to automatically

  • 0

I am building an app in which I would like the users to automatically be remembered on their computers, without having a “remember me” check box.

I read that I may have to call @user.remember_me!, but not sure where to call it since the Devise controllers are hidden.

I was considering adding a hidden checkbox field in the sign_in form with the checkbox marked by default, but I was hoping I could do this on the controllers side.

Any idea how this could be done?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:29:42+00:00Added an answer on June 17, 2026 at 12:29 pm

    I think customizing your devise controller is the way to go here.

    Goal: automatically set remember-me for everybody.

    First, create a devise sessions controller. Let’s tell rails routes about it

    config/routes.rb

    devise_for :users, :controllers => {:sessions => 'sessions'}
    

    app/controllers/sessions_controller.rb

    class SessionsController < Devise::SessionsController
    
      def create
        params[:user].merge!(remember_me: 1)
        super
      end
    
    end
    

    This way, the user’s remember me will always be set to true. yay!

    You’ll then want to edit the login form to not display the remember_me checkbox.

    Also, change this in the initializer to something far off:

    #config.remember_for = 2.weeks
    config.remember_for = 1.year
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im building an app which uses Sqlite DB. Users can enter their information into
I am building an iphone app and would like to keep track of how
I'm building an application in which I would like to let the user control
I'm building a management app in which users have to type in a PIN,
I am building a web application in which I would like to include the
I am building an iPhone app in which users (or employees) will be able
I am building an App in Flash using graph API, I would like to
I would like to start building some serious app using ember.js on the client
I am building an app which requires saving a form whenever user enter the
I am building an app which contains a list of addresses. This app is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.