Do not run validatins unless on reconfirmable branch, closes #1515.

This commit is contained in:
José Valim
2011-12-20 20:54:49 +01:00
parent 94e5a589b6
commit 89db0dd44d
4 changed files with 18 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ module SharedAdmin
:unlock_strategy => :time, :lock_strategy => :none,
:allow_unconfirmed_access_for => 2.weeks, :reconfirmable => true
validates_length_of :reset_password_token, :minimum => 3, :allow_blank => true
validates_uniqueness_of :email, :allow_blank => true, :if => :email_changed?
end