We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccf85e5 commit d960e5eCopy full SHA for d960e5e
lib/paranoia.rb
@@ -141,7 +141,8 @@ def really_destroy!
141
run_callbacks(:real_destroy) do
142
@_disable_counter_cache = paranoia_destroyed?
143
dependent_reflections = self.class.reflections.select do |name, reflection|
144
- reflection.options[:dependent] == :destroy
+ reflection.options[:dependent] == :destroy &&
145
+ reflection.options[:through].blank?
146
end
147
if dependent_reflections.any?
148
dependent_reflections.each do |name, reflection|
0 commit comments