Check dependant destory on CheckLogs

This commit is contained in:
Colin Darie 2018-07-05 16:26:15 +02:00
parent 917869925a
commit 386523e6bf
No known key found for this signature in database
GPG Key ID: 4FB865FDBCA4BCC4
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class Check < ApplicationRecord
ERROR_DELAY_DAYS = 3
belongs_to :user
has_many :logs, class_name: "CheckLog"
has_many :logs, class_name: "CheckLog", dependent: :destroy
has_many :notifications, validate: true, dependent: :destroy
accepts_nested_attributes_for :notifications,
allow_destroy: true,