Created
July 24, 2012 11:06
-
-
Save rvanlieshout/3169409 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validates :name, :presence: true, unless: :password_or_email_changed? | |
private | |
def password_or_email_changed? | |
password_changed? || email_changed? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment