Module: AuthlogicWind::ActsAsAuthentic::Methods

Defined in:
lib/authlogic_wind/acts_as_authentic.rb

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

Set up some simple validations



47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/authlogic_wind/acts_as_authentic.rb', line 47

def self.included(klass)
  klass.class_eval do
    validate :validate_by_wind, :if => :authenticating_with_wind?

    validates_uniqueness_of :wind_login, :scope => validations_scope, :if => :using_wind?
    validates_length_of_password_field_options validates_length_of_password_field_options.merge(:if => :validate_password_with_wind?)
    validates_confirmation_of_password_field_options validates_confirmation_of_password_field_options.merge(:if => :validate_password_with_wind?)
    validates_length_of_password_confirmation_field_options validates_length_of_password_confirmation_field_options.merge(:if => :validate_password_with_wind?)
    
    
  end
end