Class: ActiveRecord::Associations::Association
- Inherits:
-
Object
- Object
- ActiveRecord::Associations::Association
- Defined in:
- lib/activerecord-multi-tenant/model_extensions.rb
Instance Method Summary collapse
Instance Method Details
#skip_statement_cache?(*scope) ⇒ Boolean
136 137 138 139 140 141 142 143 144 145 |
# File 'lib/activerecord-multi-tenant/model_extensions.rb', line 136 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 |
#skip_statement_cache_orig ⇒ Object
135 |
# File 'lib/activerecord-multi-tenant/model_extensions.rb', line 135 alias skip_statement_cache_orig skip_statement_cache? |