class User < ActiveRecord::Base def self.authenticate(username, password) find(:first, :conditions => {:username => username, :password => password}) end end