Class: MultiTenant::TenantEnforcementClause
- Inherits:
-
Arel::Nodes::Node
- Object
- Arel::Nodes::Node
- MultiTenant::TenantEnforcementClause
- Defined in:
- lib/activerecord-multi-tenant/query_rewriter.rb
Instance Attribute Summary collapse
-
#tenant_attribute ⇒ Object
readonly
Returns the value of attribute tenant_attribute.
Instance Method Summary collapse
-
#initialize(tenant_attribute) ⇒ TenantEnforcementClause
constructor
A new instance of TenantEnforcementClause.
- #to_s ⇒ Object
- #to_sql ⇒ Object
- #to_str ⇒ Object
Constructor Details
#initialize(tenant_attribute) ⇒ TenantEnforcementClause
Returns a new instance of TenantEnforcementClause.
154 155 156 |
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 154 def initialize(tenant_attribute) @tenant_attribute = tenant_attribute end |
Instance Attribute Details
#tenant_attribute ⇒ Object (readonly)
Returns the value of attribute tenant_attribute.
153 154 155 |
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 153 def tenant_attribute @tenant_attribute end |
Instance Method Details
#to_s ⇒ Object
158 |
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 158 def to_s; to_sql; end |
#to_sql ⇒ Object
161 162 163 |
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 161 def to_sql(*) tenant_arel.to_sql end |
#to_str ⇒ Object
159 |
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 159 def to_str; to_sql; end |