I have a User model (with all validators and properties defined) and a UsersController. For the controller, I have a login action and a login.html.erb view file. How do I create a simple login form that validates the username and password?
I'd strongly recommend you take a look at using either Authlogic or Devise to do your login. You can find a number of tutorials that will help guide you through setting up either service. I like the Railscasts on the two subjects:
If you want to roll your own authentication, you can. Railscasts also provides a tutorial on doing that:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With