Commit 063d7bec by Mathieu Jobin

clear_association_cache is gone from rails 7

parent c6591f66
......@@ -230,8 +230,13 @@ module Paranoia
end
end
if Rails.version > '7'
# Method deleted in https://github.com/rails/rails/commit/dd5886d00a2d5f31ccf504c391aad93deb014eb8
@association_cache.clear if persisted? && destroyed_associations.present?
else
clear_association_cache if destroyed_associations.present?
end
end
end
ActiveSupport.on_load(:active_record) do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment