Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing :case_sensitive option from validates_uniqueness_of. It was …

…unnecessary and causes a small performance problem on some apps. Resolves #148
  • Loading branch information...
commit 56f0f0489a138d64794136e133c5848183c576d5 1 parent 7ae6408
Dan Croak croaky authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/clearance/user.rb
2  lib/clearance/user.rb
@@ -45,7 +45,7 @@ module Validations
# :password must be present, confirmed
included do
validates_presence_of :email, :unless => :email_optional?
- validates_uniqueness_of :email, :case_sensitive => false, :allow_blank => true
+ validates_uniqueness_of :email, :allow_blank => true
validates_format_of :email, :with => %r{^[a-z0-9!#\$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#\$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$}i, :allow_blank => true
validates_presence_of :password, :unless => :password_optional?
Please sign in to comment.
Something went wrong with that request. Please try again.