Class: MultiTenantSupport::Config::Model
- Inherits:
-
Object
- Object
- MultiTenantSupport::Config::Model
- Defined in:
- lib/multi_tenant_support/config/model.rb
Instance Attribute Summary collapse
- #default_foreign_key ⇒ Object
- #tenant_account_class_name ⇒ Object
- #tenant_account_primary_key ⇒ Object
- #tenanted_models ⇒ Object
Instance Attribute Details
#default_foreign_key ⇒ Object
18 19 20 |
# File 'lib/multi_tenant_support/config/model.rb', line 18 def default_foreign_key @default_foreign_key ||= "#{tenant_account_class_name.underscore}_id".to_sym end |
#tenant_account_class_name ⇒ Object
10 11 12 |
# File 'lib/multi_tenant_support/config/model.rb', line 10 def tenant_account_class_name @tenant_account_class_name || raise("tenant_account_class_name is missing") end |
#tenant_account_primary_key ⇒ Object
14 15 16 |
# File 'lib/multi_tenant_support/config/model.rb', line 14 def tenant_account_primary_key @tenant_account_primary_key ||= :id end |
#tenanted_models ⇒ Object
22 23 24 |
# File 'lib/multi_tenant_support/config/model.rb', line 22 def tenanted_models @tenanted_models ||= [] end |