Class: Denshobato::Message
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Denshobato::Message
- Defined in:
- lib/denshobato/models/message.rb
Instance Attribute Summary collapse
-
#conversation_id ⇒ Object
Returns the value of attribute conversation_id.
Instance Method Summary collapse
Instance Attribute Details
#conversation_id ⇒ Object
Returns the value of attribute conversation_id.
3 4 5 |
# File 'lib/denshobato/models/message.rb', line 3 def conversation_id @conversation_id end |
Instance Method Details
#message_time ⇒ Object
30 31 32 33 34 |
# File 'lib/denshobato/models/message.rb', line 30 def # Formatted time for chat panel created_at.strftime('%a %b %d | %I:%M %p') end |
#send_notification(id) ⇒ Object
Methods
22 23 24 25 26 27 28 |
# File 'lib/denshobato/models/message.rb', line 22 def send_notification(id) # Find current conversation conversation = hato_conversation.find(id) # Create Notifications create_notifications_for(conversation) end |