downcase before validation
This commit is contained in:
parent
bf33313bf9
commit
0e0df7fb22
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ class User
|
|||
|
||||
after_create :seed_aspects
|
||||
|
||||
before_save :downcase_username
|
||||
before_validation_on_create :downcase_username
|
||||
|
||||
def self.find_for_authentication(conditions={})
|
||||
if conditions[:username] =~ /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i # email regex
|
||||
|
|
|
|||
Loading…
Reference in a new issue