mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Attach nameservers directly to domain
This commit is contained in:
parent
98c2717539
commit
eb8de6479e
8 changed files with 22 additions and 36 deletions
|
@ -6,9 +6,7 @@ class Nameserver < ActiveRecord::Base
|
|||
}
|
||||
|
||||
belongs_to :registrar
|
||||
|
||||
has_many :domain_nameservers, dependent: :delete_all
|
||||
has_many :domains, through: :domain_nameservers
|
||||
belongs_to :domain
|
||||
|
||||
validates :hostname, format: { with: /\A(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\z/ }
|
||||
validates :ipv4, format: { with: /\A(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\z/, allow_blank: true }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue