From 9a76538f11064fb1bdb5f15aa8310ea04b68725c Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Mon, 15 May 2017 10:43:44 +0100 Subject: [PATCH] remove IP pool rules when deleting an IP pool --- app/models/ip_pool.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/ip_pool.rb b/app/models/ip_pool.rb index df1a301..629929b 100644 --- a/app/models/ip_pool.rb +++ b/app/models/ip_pool.rb @@ -24,6 +24,7 @@ class IPPool < ApplicationRecord has_many :servers, :dependent => :restrict_with_exception has_many :organization_ip_pools, :dependent => :destroy has_many :organizations, :through => :organization_ip_pools + has_many :ip_pool_rules, :dependent => :destroy def self.default where(:default => true).order(:id).first