Class: Anoubis::Tenant::TenantSystem
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- Core::ApplicationRecord
- ApplicationRecord
- Anoubis::Tenant::TenantSystem
- Defined in:
- app/models/anoubis/tenant/tenant_system.rb
Overview
Model for links Tenant and System models
Instance Attribute Summary
Attributes inherited from Core::ApplicationRecord
#can_delete, #can_edit, #can_new, #created_at, #current_user, #need_refresh, #redis, #sys_title, #updated_at
Instance Method Summary collapse
-
#before_update_tenant_system ⇒ Object
Checks before update data in model.
Methods inherited from ApplicationRecord
#before_create_tenant_anoubis_model, #before_update_tenant_anoubis_model, get_where
Methods inherited from Core::ApplicationRecord
#after_initialize_core_anubis_model, #can_destroy?, #current_locale, #current_locale=, #default_locale, #get_locale, #get_locale_field, get_where, #is_field_localized, #new_uuid, redis, #redis_prefix, redis_prefix, #set_locale_field
Instance Method Details
#before_update_tenant_system ⇒ Object
Checks before update data in model. Prevents from changing element data
15 16 17 18 |
# File 'app/models/anoubis/tenant/tenant_system.rb', line 15 def before_update_tenant_system self.tenant_id = self.tenant_id_was if self.tenant_id_changed? self.system_id = self.system_id_was if self.system_id_changed? end |