Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Extended by:
- MultiTenant::CopyFromClient
- Defined in:
- lib/activerecord-multi-tenant/default_scope.rb
Class Method Summary collapse
Methods included from MultiTenant::CopyFromClient
Class Method Details
.unscoped ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/activerecord-multi-tenant/default_scope.rb', line 4 def unscoped if respond_to?(:scoped_by_tenant?) && MultiTenant.current_tenant_id unscoped_orig.where(arel_table[MultiTenant.partition_key].eq(MultiTenant.current_tenant_id)) else unscoped_orig end end |
.unscoped_orig ⇒ Object
3 |
# File 'lib/activerecord-multi-tenant/default_scope.rb', line 3 alias :unscoped_orig :unscoped |