Module: Sinatra::Security::Password

Defined in:
lib/sinatra/security/password.rb

Overview

This module handles everything related to password handling.

Examples:


class User < Ohm::Model
  include Sinatra::Security::Password
end

User.attributes == [:crypted_password]
# => true

User.new.respond_to?(:password)
# => true

User.new.respond_to?(:password_confirmation)
# => true

See Also:

Defined Under Namespace

Modules: Hashing

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object



24
25
26
27
28
# File 'lib/sinatra/security/password.rb', line 24

def self.included(model)
  model.attribute :crypted_password

  model.send :attr_accessor, :password, :password_confirmation
end