Commit b41cf18f by Akira Matsuda

All currently supported versions of AR defines each_counter_cached_associations

This `defined?(super)` check was introduced for Rails 4.1 support
https://github.com/rubysherpas/paranoia/pull/390#issuecomment-284819747
but we've stopped supporting Rails 4.1 already
https://github.com/rubysherpas/paranoia/pull/393#issuecomment-289227091
parent 91ee3f35
......@@ -174,7 +174,7 @@ module Paranoia
private
def each_counter_cached_associations
!(defined?(@_disable_counter_cache) && @_disable_counter_cache) && defined?(super) ? super : []
!(defined?(@_disable_counter_cache) && @_disable_counter_cache) ? super : []
end
def paranoia_restore_attributes
......
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