Problems with navigation after log in

Hi all,

I’m struggling about the following login issue:
I have to sites site A and site B.
One link “login” on site A navigates me to site B. On site B I enter
username and password. If I write a “redirect_to :back” then I’ll be
forwarded from site B to site B. But I want to redirect after login from
Site B to Site A. Does anyone know how to manage that?

Regards,
Y

Yu Co wrote:

Hi all,

I’m struggling about the following login issue:
I have to sites site A and site B.
One link “login” on site A navigates me to site B. On site B I enter
username and password. If I write a “redirect_to :back” then I’ll be
forwarded from site B to site B. But I want to redirect after login from
Site B to Site A. Does anyone know how to manage that?

Regards,
Y

Try to do some debugging … I suggest using breakpointer … simply put
a call to “breakpoint” in your code where you want to break, and start
script/breakpointer in a new shell … this will give you an irb console
to your rails application at the breakpoint.

On Mon, 2006-11-06 at 00:48 +0100, Yu Co wrote:

Hi all,

I’m struggling about the following login issue:
I have to sites site A and site B.
One link “login” on site A navigates me to site B. On site B I enter
username and password. If I write a “redirect_to :back” then I’ll be
forwarded from site B to site B. But I want to redirect after login from
Site B to Site A. Does anyone know how to manage that?


http://rails.rubyonrails.org/classes/ActionController/Base.html#M000209

you can ‘redirect’ to anywhere you want

Craig

FWIW - You should keep in mind that you will loose your session
variables when moving between sites A and B if they reside on different
domains. This is true even when switching between www.siteA.com and
siteA.com (without the www).