in rails 2.3.0 DEPRECATION WARNING: Disabling sessions for a single controller has been deprecated. Sessions are now lazy loaded. So if you don''t access them, consider them off. You can still modify the session cookie options with request.session_options.. (called from app/controllers/application_controller.rb:9) how can i modify the session cookie options with request.session_options ? urgent help -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 4 Mar 2009, at 11:01, Sniper Abandon wrote:> > in rails 2.3.0 > > DEPRECATION WARNING: Disabling sessions for a single controller has > been > deprecated. Sessions are now lazy loaded. So if you don''t access them, > consider them off. You can still modify the session cookie options > with > request.session_options.. (called from > app/controllers/application_controller.rb:9) >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> how can i modify the session cookie options with > request.session_options > ? > > urgent helphttp://www.catb.org/~esr/faqs/smart-questions.html#urgent> -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 attempti 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---