class ActiveRecord::Associations::Association

Public Instance Methods

skip_statement_cache?(*scope) click to toggle source
# File lib/activerecord-multi-tenant/model_extensions.rb, line 130
def skip_statement_cache?(*scope)
  return true if klass.respond_to?(:scoped_by_tenant?) && klass.scoped_by_tenant?

  if reflection.through_reflection
    through_klass = reflection.through_reflection.klass
    return true if through_klass.respond_to?(:scoped_by_tenant?) && through_klass.scoped_by_tenant?
  end

  skip_statement_cache_orig(*scope)
end
Also aliased as: skip_statement_cache_orig
skip_statement_cache_orig(*scope)