Module: MultiTenantFindBy
- Defined in:
- lib/activerecord-multi-tenant/query_rewriter.rb
Instance Method Summary collapse
Instance Method Details
#cached_find_by_statement(key, &block) ⇒ Object
376 377 378 379 380 381 |
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 376 def cached_find_by_statement(key, &block) return super unless respond_to?(:scoped_by_tenant?) && scoped_by_tenant? key = Array.wrap(key) + [MultiTenant.current_tenant_id.to_s] super(key, &block) end |