This is my first question posted here, I hope this goes well.
I’m trying to work out a simple authentication system for my first
Rails site using authenticate_or_request_with_http_basic. Here is the
code I am using right now:
authenticate_or_request_with_http_basic do |name, pass|
name == ‘foo’ && pass == ‘bar’
It works when it is like that, but I would like to be able to expand
it out from there (obviously) in order to use the stored usernames and
passwords of my users for them to log in. Nothing too serious, but I’m
stuck trying to go from here.
My User table has fields named ‘username’ and ‘password’ and I’m
looking for some direction on how to incorporate those two fields into
the above method so that I will have the users use that.
Thanks for any help!