Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I did a code for basic user authentication. in my controller I call this :
- def self.authenticate(username,password)
- user = find(:first,:conditions=> { :username =>username,:password=>password})
- return user
- end
- but, it seems there are other ways to do a find:
- user = find(:first, :conditions => ['username = ?',username])
Add Comment
Please, Sign In to add comment