Class: Message
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Message
- Includes:
- ActionView::RecordIdentifier
- Defined in:
- lib/generators/appchat/templates/models/message.rb
Instance Method Summary collapse
Instance Method Details
#broadcast_message ⇒ Object
13 14 15 |
# File 'lib/generators/appchat/templates/models/message.rb', line 13 def broadcast_append_to dom_id(chat, :messages), target: "chat-messages", partial: "messages/message", locals: { message: self } end |
#broadcast_update_message ⇒ Object
9 10 11 |
# File 'lib/generators/appchat/templates/models/message.rb', line 9 def broadcast_replace_to dom_id(chat, :messages), target: dom_id(self), partial: "messages/message", locals: { message: self } end |