Hi
I use code from authentication example from ruby on rails web page.
Everything looked fine until i found thet when i log for the first time it
gives me bad redirection. When session[''return_to''] was set
everythig
had been fine so i changed (look into my code) from 1 to 2.
this is from login controler
def login
if Admins.authenticate(@params["username"],
@params["password"])!=
nil then
@session[''logged_in''] = true
if @session[''return_to'']!=nil then
redirect_to @session[''return_to'']
else
#1 this one doesn''t work pointing me to
http://myapp/display/articles/display where the first display came from
?????
#redirect_to :controller=>''articles'',
:action=>''display''
#2 this one works fine
redirect_to "/articles/display"
end
else
flash[''notice''] = ''The password you entered
is not correct.''
redirect_to :controller=>''login'', :action =>
''index''
end
end
What is the difference between those two lines if there is a difference
? Is something wrong with me or with rewriting rules ?
Jacek