Forum: Ruby on Rails Session[:user]

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.
PatRoy (Guest)
on 2007-07-17 02:45
(Received via mailing list)
Hi,

When I log in from a form post to session/create there's a call to
User.authenticate (which in turn puts a :user variable in the session
from the self.current_user call.

My issue is when I call self.current_user = User.authenticate(...)
from somewhere else and I redirect.. I lose my session variable. How
could this happen?
Shai R. (Guest)
on 2007-07-17 12:48
PatRoy wrote:
> Hi,
>
> When I log in from a form post to session/create there's a call to
> User.authenticate (which in turn puts a :user variable in the session
> from the self.current_user call.
>
> My issue is when I call self.current_user = User.authenticate(...)
> from somewhere else and I redirect.. I lose my session variable. How
> could this happen?

you should post your code for more informative detail, but this could
also be an issue of your browser ..

?
Jason M. (Guest)
on 2009-01-18 08:41
Hi,

I'm having the same problem. Were you able to solve this?

Thanks for your help.


PatRoy wrote:
> Hi,
>
> When I log in from a form post to session/create there's a call to
> User.authenticate (which in turn puts a :user variable in the session
> from the self.current_user call.
>
> My issue is when I call self.current_user = User.authenticate(...)
> from somewhere else and I redirect.. I lose my session variable. How
> could this happen?
Billy H. (Guest)
on 2009-01-18 08:52
(Received via mailing list)
Maybe somewhere has the code "reset_session"
or "session[:user] = nil"

On Sun, Jan 18, 2009 at 2:41 PM, Jason Member <
removed_email_address@domain.invalid> wrote:

> >
>
> >
>


--
TWRUG Blog:
http://blog.rubyonrails.org.tw

CFC on Rails:
http://zusocfc.blogspot.com

Only two surfaces of a box:
http://blog.pixnet.net/zusocfc
This topic is locked and can not be replied to.