Email should be case insensitive, closes #372

This commit is contained in:
José Valim 2010-07-12 07:29:45 +02:00
parent 2602ef41cf
commit ebe3e791d6
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
* Devise should respect script_name and path_info contracts
* Fix a bug when accessing a path with (.:format) (by github.com/klacointe)
* Do not add unlock routes unless unlock strategy is email or both
* Email should be case insensitive
* deprecations
* use_default_scope is deprecated and has no effect. Use :as or :devise_scope in the router instead

View File

@ -16,7 +16,7 @@ module Devise
base.class_eval do
validates_presence_of :email
validates_uniqueness_of :email, :scope => authentication_keys[1..-1], :allow_blank => true
validates_uniqueness_of :email, :scope => authentication_keys[1..-1], :case_sensitive => false, :allow_blank => true
validates_format_of :email, :with => email_regexp, :allow_blank => true
with_options :if => :password_required? do |v|