Created
February 21, 2011 01:24
-
-
Save paulclip/836516 to your computer and use it in GitHub Desktop.
Rails 3 Custom Validators
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
class User | |
# part of my User class, note the password => true, this tells Rails to call my custom validator | |
validates :password, :presence => true, | |
:password => true | |
attr_accessible :name, :username, :email, :password, :password_confirmation | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment