Rails Session Stores

For reference, since it’s not specifically in the environment.rb file and apparently no one else on the net found it necessary to place on a Google-accessible page, the proper syntax for switching from file-based session stores to DRb session stores in Rails (0.14 and onwards) is config.action_controller.session_store = :drb_store inside the Rails::Initializer block.

From what I can tell, from the contents of the ActionPack’s lib/action_controller/session/ directory, the other options are :active_record_store and :mem_cache_store. This is actually confusing, since I thought the file store class would have been there, but it’s not.


Sharpen your programming skills by completing coding exercises that are reviewed by other developers at Upcase today.