Add validations to epp users

This commit is contained in:
Martin Lensment 2014-09-30 16:01:48 +03:00
parent 38edcded92
commit 0a3e631d84
6 changed files with 26 additions and 10 deletions

View file

@ -3,6 +3,9 @@ class EppUser < ActiveRecord::Base
belongs_to :registrar
has_many :contacts
validates :username, :password, :registrar, presence: true
validates :username, uniqueness: true
attr_accessor :registrar_typeahead
def registrar_typeahead