What\'s the best way to enable users to log in with their email address OR their username? I am using warden + devise for authentication. I think it probably won\'t be too h
def self.find_for_authentication(conditions) conditions = ["username = ? or email = ?", conditions[authentication_keys.first], conditions[authentication_keys.first]] # raise StandardError, conditions.inspect super end
Use their example!