From 3a0a03290813d30cd9125ebeea239f73e439fc6a Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 18 Jul 2017 16:31:25 -0700 Subject: [PATCH] remove destroy callback on Post#favorites --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index 3d313ced3..f3e1c6832 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -49,7 +49,7 @@ class Post < ApplicationRecord has_many :children, lambda {order("posts.id")}, :class_name => "Post", :foreign_key => "parent_id" has_many :approvals, :class_name => "PostApproval", :dependent => :destroy has_many :disapprovals, :class_name => "PostDisapproval", :dependent => :destroy - has_many :favorites, :dependent => :destroy + has_many :favorites has_many :replacements, class_name: "PostReplacement" if PostArchive.enabled?