mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
a0d5823979
4 changed files with 27 additions and 11 deletions
|
@ -30,8 +30,7 @@ module Epp::DomainsHelper
|
|||
if @domain.renew(ph[:curExpDate], ph[:period])
|
||||
render '/epp/domains/renew'
|
||||
else
|
||||
handle_errors
|
||||
render '/epp/error'
|
||||
handle_errors(@domain)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@ class Domain < ActiveRecord::Base
|
|||
include EppErrors
|
||||
|
||||
EPP_CODE_MAP = {
|
||||
'2302' => ['Domain name already exists', 'Domain name is reserved or restricted'],
|
||||
'2306' => ['Registrant is missing', 'Nameservers count must be between 1-13', 'Admin contact is missing'],
|
||||
'2303' => ['Contact was not found']
|
||||
'2302' => ['Domain name already exists', 'Domain name is reserved or restricted'], # Object exists
|
||||
'2306' => ['Registrant is missing', 'Admin contact is missing', 'Given and current expire dates do not match'], # Parameter policy error
|
||||
'2004' => ['Nameservers count must be between 1-13'], # Parameter value range error
|
||||
'2303' => ['Contact was not found'] # Object does not exist
|
||||
}
|
||||
|
||||
EPP_OBJ = 'domain'
|
||||
|
@ -32,10 +33,6 @@ class Domain < ActiveRecord::Base
|
|||
validates :name, :owner_contact, presence: true
|
||||
validates_associated :nameservers
|
||||
|
||||
# after_validation :construct_epp_errors
|
||||
|
||||
attr_accessor :epp_errors
|
||||
|
||||
def name=(value)
|
||||
value.strip!
|
||||
write_attribute(:name, SimpleIDN.to_unicode(value))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue