Module: ActionController::Session

Defined in:
lib/rails_4_session_flash_backport/rails2/session_with_indifferent_access.rb,
lib/rails_4_session_flash_backport/rails2/session_with_indifferent_access.rb

Overview

The SessionHash acts like a HashWithIndifferentAccess on Rails 3, which causes problems with the session_id among other things. On Rails 2 the session_id is stored as session, if we take that session to Rails 3 it becomes session, and if we bring it back to Rails 2 it’s still session, but Rails checks session, finds nothing and generates a new one. This is unacceptable.

We’ve patched the SessionHash to #to_s keys before it stores them, and to fall back from the string key to the symbol if needed.

Defined Under Namespace

Classes: AbstractStore, CookieStore