Session store active_record_store doesn't work


#1

I want to use acitive record store session.
So I edited files like below.

*environment.rb
config.action_controller.session_store = :active_record_store

*application.rb
protect_from_forgery :secret => ‘54420ada…’

*rake task
rake db:sessions:create #successfully created

And controller and views like below

*Controller
class TestIndexController < ApplicationController
def index
session[:test]=‘Test Value’

end
end

*Views
test_index/index.html.erb
<%=session[:test]%> #=>‘Test Value’

test_index/new.html.erb
<%=session[:test]%> #=>nil<==This is the problem!!

Session table creates session data certainly, but I can’t get
session[:test]
value except index action.
Why?? Please give me advice!

PS:My environment is below.
Rails 2.2.2
ruby1.8.6
gem 1.3.1
Mac OS 10.5.5


View this message in context:
http://www.nabble.com/session-store-active_record_store-doesn't-work.-tp21212439p21212439.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.