mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 04:58:29 +02:00
Reject DNS key if public_key is blank
This commit is contained in:
parent
bb6afc7e87
commit
416128823b
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ class Domain < ActiveRecord::Base
|
||||||
has_many :domain_transfers, dependent: :delete_all
|
has_many :domain_transfers, dependent: :delete_all
|
||||||
|
|
||||||
has_many :dnskeys, dependent: :delete_all
|
has_many :dnskeys, dependent: :delete_all
|
||||||
accepts_nested_attributes_for :dnskeys, allow_destroy: true
|
accepts_nested_attributes_for :dnskeys, allow_destroy: true,
|
||||||
|
reject_if: proc { |attrs| attrs[:public_key].blank? }
|
||||||
|
|
||||||
delegate :code, to: :owner_contact, prefix: true
|
delegate :code, to: :owner_contact, prefix: true
|
||||||
delegate :email, to: :owner_contact, prefix: true
|
delegate :email, to: :owner_contact, prefix: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue