lib/simple_password_authentication/model_methods.rb
#Find a user using a username and password
#Returns the user if successful, false otherwise
Find a user using a username and password
Returns the user if successful, false otherwise
Find a user using a username and password Returns the user if successful false otherwise
def authenticate(username, password)
          if user = find_by_username(username)
            if user.correct_password?(password)
              user
            end
          end
        end
def authenticate ( username , password ) if user = find_by_username ( username ) if user . correct_password? ( password ) user end end end
Find a user using a username and password
Returns the user if successful, false otherwise
Find a user using a username and password Returns the user if successful false otherwise
username
<not_specific>
password
<not_specific>