Files

Merb::Authentication::Mixins::SaltedUser::ARClassMethods

Public Class Methods

extended(base) click to toggle source
    # File lib/merb-auth-more/mixins/salted_user/ar_salted_user.rb, line 6
 6:         def self.extended(base)
 7:           base.class_eval do
 8: 
 9:             validates_presence_of     :password,                   :if => :password_required?
10:             validates_presence_of     :password_confirmation,      :if => :password_required?
11:             validates_confirmation_of :password,                   :if => :password_required?
12: 
13:             before_save :encrypt_password
14:           end # base.class_eval
15: 
16:         end

Public Instance Methods

authenticate(login, password) click to toggle source
    # File lib/merb-auth-more/mixins/salted_user/ar_salted_user.rb, line 18
18:         def authenticate(login, password)
19:           @u = find(:first, :conditions => ["#{Merb::Authentication::Strategies::Basic::Base.login_param} = ?", login])
20:           @u && @u.authenticated?(password) ? @u : nil
21:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.