Ele
Ele

Reputation: 33726

Rails sessions when stop / start server

When I stop Rails server and start it again, the session hash still has objects.

Why is happening that ?

Thank you in advance, Ele

Upvotes: 0

Views: 46

Answers (2)

xlembouras
xlembouras

Reputation: 8295

By default you store the sessions to a cookie. That means that the data are on the client side. So even if you restart your server, the data remains.

check here for the docs.

You can of course store your session in various session stores

Upvotes: 1

HomemadeIcing
HomemadeIcing

Reputation: 98

try rake db:drop

then after that rake db:migrate to migrate your database from schema

otherwise check your seeds file to see if you have any seed data.

Upvotes: 1

Related Questions