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 4067426
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:14:52+00:00 2026-05-20T16:14:52+00:00

I have a Rails app with devise integrated. I’m using the Cookie Store session.

  • 0

I have a Rails app with devise integrated. I’m using the Cookie Store session. I need to store some data in the session everytime someone signs in, Eg. their user id. How can i do so with Devise?

May be there is some elegant way where i just dont need to do that and could access it with Devise itself.?

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-05-20T16:14:53+00:00Added an answer on May 20, 2026 at 4:14 pm

    You can use the “session” variable inside the controllers. Something like
    session[:some_value] = "some_value"

    Also Devise already has the user_id stored in the session.current_user helper method can be used here.

    Also make sure you read this, it has details about the what to store in session or not.
    http://guides.rubyonrails.org/security.html

    Also cookie session store is usually only 4k in size, so you can’t store a lot of data in them or your app will start to error out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started using devise for my rails app, however i need to make
I have a Rails app that will post some data to another Rails app.
I have a Rails app with some basic models. The website displays data retrieved
I have a Rails 3 App using Devise on Heroku. Problem is I'm sending
I have a Rails 3 app with authentication setup using Devise with the registerable
I am using Devise and omniauth for authentication in my rails app. I have
I have a Rails app that I need to deploy. Here are the facts:
I have a Rails app that sets a cookie and does a redirect to
I have Rails app with a Postgres backend. I need to add full text
I have a Rails 3 application using Devise for authentication. In addition to the

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.