validate user.login uniqueness correctly

This commit is contained in:
Lee Lawlor 2014-06-11 12:17:58 -04:00
parent 5f69a17f9e
commit f94a99fdd8

View File

@ -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