Hi, all. I have shared between 2 sites ActiveRecord Session Store. On the first i've created UserSession object. Is there any way to restore UserSession on the second if i know session_id?
A:
I think you have to store the session in a database table and so you can access it from different rails apps.
In environment.rb:
config.action_controller.session_store = :active_record_store
With
rake db:sessions:create
you create the following sessions-table
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id
add_index :sessions, :updated_at
Lichtamberg
2009-09-25 11:59:04
ok, but maybe you have working example?
Alexey Poimtsev
2009-09-26 10:23:59
Updated my answer
Lichtamberg
2009-09-28 07:19:41
huh ... I've already developed solution and i've described in my blog. This post is in russian lang, but you can translate in to english using google translate - http://tinyurl.com/y976yhn
Alexey Poimtsev
2009-09-28 10:17:24
A:
I've described solution in my blog - http://tinyurl.com/y976yhn
Alexey Poimtsev
2009-09-28 10:18:07