By default, sessions are stored in browser cookies (:cookie_store), but you can also specify one of the other included stores (:active_record_store, :mem_cache_store, or your own custom class. Please give me the way to build custom class
config.action_controller.session_store = :your_customer_class
Maurício Linhares is correct, however, I wanted to add some detail because I don’t think it’s obvious which methods you need to implement.
You can inherit from ActionDispatch::Session::AbstractStore, but that inherits from Rack::Session::Abstract::ID which is a good place to look for the methods you need to implement. Specifically, from Rack::Session::Abstract::ID:
I wrote a simple file-based session store as an experiment.