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.



217
218
219
220
221
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 217

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

Instance Attribute Details

#table_leftObject (readonly)

Returns the value of attribute table_left.



215
216
217
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 215

def table_left
  @table_left
end