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
150 151 152 153 154 155 156 157 158 159 |
# File 'lib/activerecord-multi-tenant/model_extensions.rb', line 150 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
149 |
# File 'lib/activerecord-multi-tenant/model_extensions.rb', line 149 alias skip_statement_cache_orig skip_statement_cache? |