Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sessions in Rails 4

If ActiveRecord::Store is being deprecated, what is the suggested method for maintaining session? Is encrypted cookie store the new standard? What if you want to maintain >4kb in state?

like image 770
Michael Avatar asked Feb 06 '13 02:02

Michael


1 Answers

In Rails 4, includegem 'activerecord-session_store' in your Gemfile and run bundle install. Complete the migration and configuration as per https://github.com/rails/activerecord-session_store notes.

The other alternative is using the 'dalli' gem for session management.

like image 171
user553620 Avatar answered Oct 02 '22 11:10

user553620