Class: MultiTenant::TenantJoinEnforcementClause

Inherits:
BaseTenantEnforcementClause show all
Defined in:
lib/activerecord-multi-tenant/query_rewriter.rb

Instance Attribute Summary collapse

Attributes inherited from BaseTenantEnforcementClause

#tenant_attribute

Instance Method Summary collapse

Methods inherited from BaseTenantEnforcementClause

#to_s, #to_sql, #to_str

Constructor Details

#initialize(tenant_attribute, table_left) ⇒ TenantJoinEnforcementClause

Returns a new instance of TenantJoinEnforcementClause.



189
190
191
192
193
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 189

def initialize(tenant_attribute, table_left)
  super(tenant_attribute)
  @table_left = table_left
  @model_left = MultiTenant.multi_tenant_model_for_table(table_left.table_name)
end

Instance Attribute Details

#table_leftObject (readonly)

Returns the value of attribute table_left.



188
189
190
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 188

def table_left
  @table_left
end