diff --git a/lib/paranoia.rb b/lib/paranoia.rb index 4ba4c389..288f04b4 100644 --- a/lib/paranoia.rb +++ b/lib/paranoia.rb @@ -141,7 +141,8 @@ def really_destroy! run_callbacks(:real_destroy) do @_disable_counter_cache = paranoia_destroyed? dependent_reflections = self.class.reflections.select do |name, reflection| - reflection.options[:dependent] == :destroy + reflection.options[:dependent] == :destroy && + reflection.options[:through].blank? end if dependent_reflections.any? dependent_reflections.each do |name, reflection|