Skip to content

Instantly share code, notes, and snippets.

@paulclip
Created February 21, 2011 01:24
Show Gist options
  • Save paulclip/836516 to your computer and use it in GitHub Desktop.
Save paulclip/836516 to your computer and use it in GitHub Desktop.
Rails 3 Custom Validators
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