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