Frederick Cheung wrote:
> On 4 Mar 2009, at 11:01, Sniper Abandon wrote:
>
> What it's telling you is that
> 
> class FooController
>    session :off
> end
> 
> is no longer necessary since sessions are not loaded unless accessed.
> (and that you can set session options with
> request.session_options['some_key']= 'some_value' (eg if you want to
> change the expiry date)
> 
> Fred
> 

Thanks for ur reply

i created a new rails(2.3.0) project
  ActionController::Base.session_store = :active_record_store
at login (in session controller , create action)
session[:id]=current_user.id

after that
redirect_to :controller =>"home"


in debugger mode (at home controller ,index action)

Completed in 156ms (DB: 46) | 302 Found 
[http://localhost/session/create]
D:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.0/lib/action_controller/base
.rb:1262
default_render unless performed?
(rdb:2) session
{}
(rdb:2) session[:id]
nil

>here one question, where is my session value ? 

i searched arround net and i got
http://guides.rails.info/2_3_release_notes.html#rack-based-lazy-loaded-sessions

there is a line like this
"Session stores are now lazy loaded. If you never access the session 
object during a request, it will never attempt to load the session data 
(parse the cookie, load the data from memcache, or lookup an Active 
Record object)."

pls check that line
>If you never access the session object during a request, it will never attempt

i don't know how to get my session ?


-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to