Hiya - before I start let me tell you i’m a Nuby on Rails.
I’ve created a user registration within my application that requires
email validation and that seems to be working fine.
I’m now creating the user login page and have the following code in my
@user = User.new
@user.username = params[:username]
if user = User.authenticate(params[:user])
session[:id] = user.id # Remember the user’s id during this
redirect_to session[:return_to] || ‘/’
flash[:error] = ‘Invalid login.’
redirect_to :action => ‘login’, :username =>
flash[:message] = ‘You are now logged out.’
redirect_to :action => ‘login’
I’ve attempted to login using a validated account that I set up but
can’t seem to get passed the process_login.
It doesn’t seem to attempt to ‘authenticate’. I’m just seeing
process_login.rhtml. Is there something missing in my code?