Forum: Ruby on Rails Multiple sessions?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Andrew H. (Guest)
on 2007-03-01 08:54
So here's the situation:

I'm working on a Rails site that needs to have two separate
authenticated areas (the cms and a shopping cart).  I haven't begun
working on the shopping cart yet, but I need to figure out the best way
to approach having those two areas not step on each other's feet.

I want to keep the sessions separate.  What's the best way handle that
with Rails?  I'm guessing that by default, I'm going to be working with
the same session in both areas.
javier ramirez (Guest)
on 2007-03-01 10:14
(Received via mailing list)
> I want to keep the sessions separate.  What's the best way handle that
> with Rails?  I'm guessing that by default, I'm going to be working with
> the same session in both areas.
>
you may want to take a look at this
http://api.rubyonrails.com/classes/ActionControlle...
and this http://www.ruby-doc.org/core/classes/CGI/Session.h...

As you see, you can specify different per action options, and one of the
options is the session key (which rails 1.2.0 and above set by deffault
at the application controller).

regards,

javier ramirez

--
--------
Estamos de estreno... si necesitas llevar el control de tus gastos
visita http://www.gastosgem.com !!Es gratis!!
This topic is locked and can not be replied to.