Hi guys, new here so bonjour.. Sorry if this question has been asked, but i had a good look and i''m just generally confused about this at the moment! ive been learning rails for about 4 months now and im on to sessions and more importantly where there stored, i have "Agile web development" and the lydna screencasts which both talk about sessions. However the agile web development book describes these as ActiveRecordStore, which no longer exists? and Lynda.com is using an old unscalable file system method? Is there a nice guide, long or short someone on the web that shows how to do sessions currently and preferably storing them in a database (mysql)? Cheers, Alex
Currently Rails stores sessions in the browser and this is the most scalable solution found until now. Unless you have a really great idea to build a better session store, just use the cookie based one and you''re done. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Thu, Jun 11, 2009 at 12:10 PM, Alex Barlow<alexbarlowis-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > Hi guys, new here so bonjour.. > > Sorry if this question has been asked, but i had a good look and i''m > just generally confused about this at the moment! > > ive been learning rails for about 4 months now and im on to sessions > and more importantly where there stored, i have "Agile web > development" and the lydna screencasts which both talk about sessions. > > However the agile web development book describes these as > ActiveRecordStore, which no longer exists? > > and Lynda.com is using an old unscalable file system method? > > Is there a nice guide, long or short someone on the web that shows how > to do sessions currently and preferably storing them in a database > (mysql)? > > Cheers, Alex > > > >
I have memcached based sessions (i.e. config/environment.rb "config.action_controller.session_store = :mem_cache_store") from before 2.3. Are their any issues I should I keep in mind if I switch to the new hotness? Man, that phrase sounds dated! Cheers, Walter 2009/6/12 Maurício Linhares <mauricio.linhares-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> > Currently Rails stores sessions in the browser and this is the most > scalable solution found until now. > > Unless you have a really great idea to build a better session store, > just use the cookie based one and you''re done. > > - > Maurício Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Thu, Jun 11, 2009 at 12:10 PM, Alex > Barlow<alexbarlowis-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > Hi guys, new here so bonjour.. > > > > Sorry if this question has been asked, but i had a good look and i''m > > just generally confused about this at the moment! > > > > ive been learning rails for about 4 months now and im on to sessions > > and more importantly where there stored, i have "Agile web > > development" and the lydna screencasts which both talk about sessions. > > > > However the agile web development book describes these as > > ActiveRecordStore, which no longer exists? > > > > and Lynda.com is using an old unscalable file system method? > > > > Is there a nice guide, long or short someone on the web that shows how > > to do sessions currently and preferably storing them in a database > > (mysql)? > > > > Cheers, Alex > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, you can''t have a lot of objects in the session using the cookie based session store, but this shouldn''t be a problem if you''re just storing things like the flash or user ids on it. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Fri, Jun 12, 2009 at 1:27 AM, Walter McGinnis<walter.mcginnis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have memcached based sessions (i.e. config/environment.rb > "config.action_controller.session_store = :mem_cache_store") from before > 2.3. Are their any issues I should I keep in mind if I switch to the new > hotness? > Man, that phrase sounds dated! > Cheers, > Walter > > 2009/6/12 Maurício Linhares <mauricio.linhares-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> Currently Rails stores sessions in the browser and this is the most >> scalable solution found until now. >> >> Unless you have a really great idea to build a better session store, >> just use the cookie based one and you''re done. >> >> - >> Maurício Linhares >> http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr >> >> >> >> On Thu, Jun 11, 2009 at 12:10 PM, Alex >> Barlow<alexbarlowis-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> > >> > Hi guys, new here so bonjour.. >> > >> > Sorry if this question has been asked, but i had a good look and i''m >> > just generally confused about this at the moment! >> > >> > ive been learning rails for about 4 months now and im on to sessions >> > and more importantly where there stored, i have "Agile web >> > development" and the lydna screencasts which both talk about sessions. >> > >> > However the agile web development book describes these as >> > ActiveRecordStore, which no longer exists? >> > >> > and Lynda.com is using an old unscalable file system method? >> > >> > Is there a nice guide, long or short someone on the web that shows how >> > to do sessions currently and preferably storing them in a database >> > (mysql)? >> > >> > Cheers, Alex >> > >> > > >> > >> >> > > > > >
Hi Alex, If you''re using rails 2.3.2, take a look at ./config/initializers/ session_store.rb. There you''ll see what you''re looking for: ... #ActionController::Base.session_store = :active_record_store ... Jeff On Jun 11, 8:10 am, Alex Barlow <alexbarlo...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hi guys, new here so bonjour.. > > Sorry if this question has been asked, but i had a good look and i''m > just generally confused about this at the moment! > > ive been learning rails for about 4 months now and im on to sessions > and more importantly where there stored, i have "Agile web > development" and the lydna screencasts which both talk about sessions. > > However the agile web development book describes these as > ActiveRecordStore, which no longer exists? > > and Lynda.com is using an old unscalable file system method? > > Is there a nice guide, long or short someone on the web that shows how > to do sessions currently and preferably storing them in a database > (mysql)? > > Cheers, Alex