mirror of
https://github.com/postalserver/postal.git
synced 2026-10-22 20:26:08 +00:00
remove IP pool rules when deleting an IP pool
This commit is contained in:
@@ -24,6 +24,7 @@ class IPPool < ApplicationRecord
|
|||||||
has_many :servers, :dependent => :restrict_with_exception
|
has_many :servers, :dependent => :restrict_with_exception
|
||||||
has_many :organization_ip_pools, :dependent => :destroy
|
has_many :organization_ip_pools, :dependent => :destroy
|
||||||
has_many :organizations, :through => :organization_ip_pools
|
has_many :organizations, :through => :organization_ip_pools
|
||||||
|
has_many :ip_pool_rules, :dependent => :destroy
|
||||||
|
|
||||||
def self.default
|
def self.default
|
||||||
where(:default => true).order(:id).first
|
where(:default => true).order(:id).first
|
||||||
|
|||||||
Reference in New Issue
Block a user