Skip to content

Instantly share code, notes, and snippets.

@tizoc
Created October 15, 2010 15:07
Show Gist options
  • Save tizoc/628340 to your computer and use it in GitHub Desktop.
Save tizoc/628340 to your computer and use it in GitHub Desktop.
def login(username, password)
user_id = authenticate(:user, username, password)
if user_id
session[:user] = user_id
return true
else
return false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment