Closed regdog closed 13 years ago
I suspect the problem is the form_for :session
. Please can you replace form_for :session, :url => sign_in_url
with form_tag sign_in_url
and try it again?
Yeah, the problem is the "form_for :session". Everything works with "form_tag sign_in_url". I got that "form_for" cannot be used here becuase it generated params session[username], session[password], not params[:username], params[:password].
Great thanks!!! :)
I have updated to v1.0.7 and signed up a new user(with sign in) successfully. But it failed to sign in this new user with sign-in form. The flash message is "Sorry, we did not recognise you." It shows that the create action of session controller is called correctly. So I checked in console with statement User.authenticate(username, password). It returns my new user successfully. Then, I am confused. I cannot figure out where I am doing wrong.
Here is my sign in form template.