Friday, April 23, 2010

Rails Cookie and ActiveRecord Sessions

Rails by default uses an encrypted cookie store. Problem is that this store is limited to 4k if you need the space you should switch to something else

Here is how to switch to an active record store:

add the following line to config/environment.rb

config.action_controller.session_store = :active_record_store
Then to create the sessions table execute;

rake db:sessions:create
rake db:migrate

No comments:

Post a Comment