I’m having problems with sessions. Ive created a sessions table via the db:sessions:create. Now what happens is that whenever i
maneuver around my site, it keeps on creating new sessions. I just want
one session per user to store their user ids. I was just wondering
where i was going wrong.
Maybe you could provide some code to help us better understand what you
are doing. My app, for example, creates a session variable when a user
logs in or creates an account like so:
Do you have some kind of before_filter in your model that keeps hitting
that part of the code that makes the session variable? This would result
in a session variable continiously being created.
For example, to ensure that a user is who they say they are when they
try to navigate to a certain page in my app, I have apllied a filter
that does a check before they can view that page: