Module: PasswordValidators

Defined in:
lib/wheels/password_validators.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



2
3
4
5
6
7
# File 'lib/wheels/password_validators.rb', line 2

def self.included(base)
  attr_accessor :old_password
  validates :old_password, :presence=>true  , :password=>true
  validates :password, :presence=>true      , :length=>{:minimum=>6}
  validates :password_confirmation, :equal_to=>{:other=>:password}
end