Class: Messaged::Room
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Messaged::Room
- Defined in:
- app/models/messaged/room.rb
Instance Method Summary collapse
-
#owner ⇒ Object
Rooms should default to the person sending them, otherwise fallback to the chat room, and finally tenant if they exist.
Instance Method Details
#owner ⇒ Object
Rooms should default to the person sending them, otherwise fallback to the chat room, and finally tenant if they exist.
27 28 29 30 31 |
# File 'app/models/messaged/room.rb', line 27 def owner return user if user return tenant if Messaged.tenant_class_name && tenant return nil # replace with user, tenant, or room end |