session-hack-rails2-rails3

Hackery to get Rails 2 and 3 to share a common session in the browser. Rails 2 and 3 both put FlashHash in the session but have different APIs and cannot de-serialize sessions from the other version.

Installation

Add this line to your application’s Gemfile: <p><code>gem ‘session-hack-rails2-rails3’

And then execute: <p><code> $ bundle

Or install it yourself as: <p><code> $ gem install ‘session-hack-rails2-rails3’

Usage

In your rails3 app, add the following in the config/initializers/session_store.rb <p><code>require ‘rails2_to_3_flash_serialization’

In your rails2 app, add the following in the config/initializers/session_store.rb <p><code>require ‘rails3_to_2_flash_serialization’

That’s all! You should be able to share session object between your rails2 and rails3 apps.

Contributing to session-hack-rails2-rails3