Module: DataMapper::Is::Authenticatable

Defined in:
lib/dm-is-authenticatable/is/authenticatable.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: UnknownResource

Instance Method Summary collapse

Instance Method Details

#is_authenticatableObject



10
11
12
13
14
15
16
17
18
# File 'lib/dm-is-authenticatable/is/authenticatable.rb', line 10

def is_authenticatable
  # The encrypted password
  property :encrypted_password, DataMapper::Property::BCryptHash
    
  extend DataMapper::Is::Authenticatable::ClassMethods
  include DataMapper::Is::Authenticatable::InstanceMethods

  validates_confirmation_of :password
end