Browse Source

Fix: validate username presence & uniqueness

master
Ilya Konanykhin 8 years ago
parent
commit
66fee66db0
  1. 1
      app/models/user.rb

1
app/models/user.rb

@ -26,6 +26,7 @@ class User < ActiveRecord::Base
default_scope order('username ASC') default_scope order('username ASC')
validates :username, :presence => true, uniqueness: true
validates :first_name, :presence => true validates :first_name, :presence => true
validates :last_name, :presence => true validates :last_name, :presence => true

Loading…
Cancel
Save