create#contacts refactor

This commit is contained in:
Andres Keskküla 2014-08-06 11:38:21 +03:00
parent 2adbd915f7
commit 813674c965
4 changed files with 28 additions and 6 deletions

View file

@ -15,6 +15,7 @@ class Contact < ActiveRecord::Base
validate :ident_must_be_valid
validates :phone, format: { with: /\+\d{3}\.\d+/, message: "bad format" }
validates_uniqueness_of :code, message: :epp_id_taken
IDENT_TYPE_ICO = 'ico'
IDENT_TYPES = [