internetee-registry/app/models/domain_status.rb
2014-08-21 16:47:21 +03:00

21 lines
369 B
Ruby

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 epp_code_map
{
'2302' => [[:setting, :taken]]
}
end
end