The following line no longer works in 2.3: ActiveRecord::SessionStore.delete_all [''updated_at < ?'', 24.hours.ago] Does anyone know how to do this in 2.3? Thanks, Jay --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jay wrote:> The following line no longer works in 2.3: > > ActiveRecord::SessionStore.delete_all [''updated_at < ?'', 24.hours.ago] > > Does anyone know how to do this in 2.3?Do you really need to go though Rails to do this? I think I would just write a simple script and execute it in a cron task to clear out old sessions. As far as I can tell, as long as the sessions fit the criteria for cookie based session stores, it seems to me like a very clean way to deal session data. That way the server and database are relieved from the burden of dealing with sessions. I am also looking forward to the day when it becomes feasible to use HTML 5.0 local storage to keep session data. I believe this will be the final solution to dealing with persistent data for web applications. It eliminates the current limitations of cookie based sessions while simultaneously pushing state related information out to the client-side where, IMHO, it belongs. -- 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 -~----------~----~----~----~------~----~------~--~---
Ouch, you''re right ! I''ve the same problem, I watch the API and solved ! Try this: ActiveRecord::SessionStore::Session.delete_all [''updated_at < ?'', 24.hours.ago] Have fun !> The following line no longer works in 2.3: > > ActiveRecord::SessionStore.delete_all [''updated_at < ?'', 24.hours.ago] > > Does anyone know how to do this in 2.3? > > Thanks, > Jay > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---