diff --git a/app/models/user.rb b/app/models/user.rb index 11bd8f8..da12ec1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -49,6 +49,8 @@ class User < ActiveRecord::Base self.include_root_in_json = false + validates_uniqueness_of :login + # pagination variables cattr_reader :per_page @@per_page = 50