Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does session_store.rb do?

Hi everybody
I don't understand the usefulness of the session_store.rb file, I tried to read some docs, but I still don't understand, for example, why should I edit that file?

like image 700
zer0uno Avatar asked May 11 '26 02:05

zer0uno


1 Answers

You can change the underlying mechanism of your Session store:

Default is using cookie_store:

Yourapp::Application.config.session_store :cookie_store, key: '_yourapp_session'

However, you can change it to use ActiveRecord, meaning your DB:

Yourapp::Application.config.session_store :active_record_store

Read the Session section of the following tutorial:

http://guides.rubyonrails.org/action_controller_overview.html

like image 167
Yosep Kim Avatar answered May 13 '26 16:05

Yosep Kim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!