Class: Chat
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Chat
- Defined in:
- lib/templates/chat/migration-models/chat.rb
Overview
Schema Information
Table name: chats
id :integer not null, primary key
name :string
last_message :string
created_at :datetime not null
updated_at :datetime not null
Instance Method Summary collapse
Instance Method Details
#mark_user_seen(user) ⇒ Object
21 22 23 |
# File 'lib/templates/chat/migration-models/chat.rb', line 21 def mark_user_seen(user) participants.find_by(user: user).update_column(:seen_data, true) end |