mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
Domain statuses improvements
This commit is contained in:
parent
f43662e8b0
commit
e20944151e
10 changed files with 54 additions and 10 deletions
|
@ -1,4 +1,25 @@
|
|||
class DomainStatus < ActiveRecord::Base
|
||||
# Domain statuses are stored as settings
|
||||
include EppErrors
|
||||
|
||||
EPP_ATTR_MAP = {
|
||||
setting: 'status'
|
||||
}
|
||||
|
||||
belongs_to :domain
|
||||
belongs_to :setting
|
||||
|
||||
delegate :value, :code, to: :setting
|
||||
|
||||
validates :setting, uniqueness: { scope: :domain_id }
|
||||
|
||||
def setting_uniqueness
|
||||
|
||||
end
|
||||
|
||||
def epp_code_map
|
||||
{
|
||||
'2302' => [[:setting, :taken]]
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue