Class: User
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- User
- Defined in:
- app/models/user.rb
Instance Method Summary collapse
Instance Method Details
#after_database_authentication ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/models/user.rb', line 12 def after_database_authentication if !self.admin Apartment::Tenant.switch!(Company.find(self.company_id).company_name.gsub(/'/,'').gsub(/\s/,'')) else Apartment::Tenant.switch! end end |