mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Prevent resgistrar deleting when children exist
This commit is contained in:
parent
79bfa3049e
commit
6f874ecb2a
1 changed files with 2 additions and 3 deletions
|
@ -1,9 +1,8 @@
|
||||||
class Registrar < ActiveRecord::Base
|
class Registrar < ActiveRecord::Base
|
||||||
belongs_to :country
|
belongs_to :country
|
||||||
has_many :domains, :dependent => :restrict_with_error
|
has_many :domains, :dependent => :restrict_with_error
|
||||||
has_many :ns_sets
|
has_many :epp_users, :dependent => :restrict_with_error
|
||||||
has_many :epp_users
|
has_many :users, :dependent => :restrict_with_error
|
||||||
has_many :users
|
|
||||||
|
|
||||||
validates :name, :reg_no, :address, :country, presence: true
|
validates :name, :reg_no, :address, :country, presence: true
|
||||||
validates :name, :reg_no, uniqueness: true
|
validates :name, :reg_no, uniqueness: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue