validate user.login uniqueness correctly
This commit is contained in:
parent
5f69a17f9e
commit
f94a99fdd8
@ -49,7 +49,8 @@ class User < ActiveRecord::Base
|
|||||||
|
|
||||||
self.include_root_in_json = false
|
self.include_root_in_json = false
|
||||||
|
|
||||||
validates_uniqueness_of :login
|
validates :login, uniqueness: { case_sensitive: false }
|
||||||
|
validates :email, uniqueness: { case_sensitive: false }
|
||||||
|
|
||||||
# pagination variables
|
# pagination variables
|
||||||
cattr_reader :per_page
|
cattr_reader :per_page
|
||||||
|
Loading…
Reference in New Issue
Block a user