From f94a99fdd87008a1aa86c964f037b58a4c1587e2 Mon Sep 17 00:00:00 2001 From: Lee Lawlor Date: Wed, 11 Jun 2014 12:17:58 -0400 Subject: [PATCH] validate user.login uniqueness correctly --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index da12ec1..986a037 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -49,7 +49,8 @@ class User < ActiveRecord::Base self.include_root_in_json = false - validates_uniqueness_of :login + validates :login, uniqueness: { case_sensitive: false } + validates :email, uniqueness: { case_sensitive: false } # pagination variables cattr_reader :per_page