Module: Authlogic::ActsAsAuthentic::Email::Methods

Defined in:
lib/authlogic/acts_as_authentic/email.rb

Overview

All methods relating to the email field

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



65
66
67
68
69
70
71
72
73
# File 'lib/authlogic/acts_as_authentic/email.rb', line 65

def self.included(klass)
  klass.class_eval do
    if validate_email_field && email_field
      validates_length_of email_field, validates_length_of_email_field_options
      validates_format_of email_field, validates_format_of_email_field_options
      validates_uniqueness_of email_field, :scope => validations_scope, :if => "#{email_field}_changed?".to_sym
    end
  end
end