Displaying 2 results from an estimated 2 matches for "redirect_to_path".
2006 Feb 28
1
Oracle OraNumber problem with Authentication. Please help!
...e :
class LoginController < ApplicationController
model :employee
.....
def authenticate
if employee = Employee.authenticate(@params["username"],
@params["password"])
session["employee"] = employee
if session["return_to"]
redirect_to_path(@session["return_to"])
session["return_to"] = nil
else
redirect_to :controller => "weblog"
end
else
flash["alert"] = "Login failed!"
redirect_to :action => "index"
end
end
....
end...
2005 Nov 25
0
Login Authentication working in IE but not in Mozilla
...ler that does login:
class LoginController < ActionController::Base
def index
# show login screen
end
def authenticate
if @session["person"] = Person.authenticate(@params["name"],
@params["password"])
if @session["return_to"]
redirect_to_path(@session["return_to"])
@session["return_to"] = nil
else
redirect_to :controller => "weblog"
end
else
flash["alert"] = "Login failed!"
redirect_to :action => "index"
end
end
def log...