My question is, on the controller end, how do I access the parameter
for login and password? I thought it would be params[:login] and
params[:password], but that is not right. Any help is appreciated, -
Dave
My code now:
def userconfirm
@user = User.new(params[:user])
if @user.save
# Create session
if (log_user_in(params[:login],
params[:password], nil))
redirect_to :controller =>
'order', :action => 'new'
else
flash[:notice] = "You are not logged
in."
redirect_to :action => "start"
end
else
render :action => 'userinfo'
end
end
If you are using rails 2, you can also use the debugger which is a TON of help. start script/server with --debugger and put “debugger” on the line you want it to stop on. Then you can inspect variables, step, and even evaluate routines. WAY cool!!