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