Class: Thredded::MarkAllRead
- Inherits:
-
Object
- Object
- Thredded::MarkAllRead
- Defined in:
- app/commands/thredded/mark_all_read.rb
Overview
Marks all private topics as read for the given user.
Class Method Summary collapse
Class Method Details
.run(user) ⇒ Object
6 7 8 9 10 |
# File 'app/commands/thredded/mark_all_read.rb', line 6 def self.run(user) Thredded::PrivateTopic.unread(user).each do |topic| Thredded::UserPrivateTopicReadState.touch!(user.id, topic.last_post) end end |