lib/webhook_system/subscription.rb in webhook_system-2.1.2 vs lib/webhook_system/subscription.rb in webhook_system-2.1.3
- old
+ new
@@ -6,10 +6,10 @@
validates :url, presence: true, url: { no_local: true }
validates :secret, presence: true
has_many :topics, class_name: 'WebhookSystem::SubscriptionTopic', dependent: :destroy
- has_many :event_logs, class_name: 'WebhookSystem::EventLog', dependent: :destroy
+ has_many :event_logs, class_name: 'WebhookSystem::EventLog', dependent: :delete_all
accepts_nested_attributes_for :topics, allow_destroy: true
scope :active, -> { where(active: true) }
scope :for_topic, -> (topic) {