Class: Thredded::MembersMarkedNotified
- Inherits:
-
Object
- Object
- Thredded::MembersMarkedNotified
- Defined in:
- app/commands/thredded/members_marked_notified.rb
Instance Method Summary collapse
-
#initialize(post, members) ⇒ MembersMarkedNotified
constructor
A new instance of MembersMarkedNotified.
- #run ⇒ Object
Constructor Details
#initialize(post, members) ⇒ MembersMarkedNotified
Returns a new instance of MembersMarkedNotified.
4 5 6 7 |
# File 'app/commands/thredded/members_marked_notified.rb', line 4 def initialize(post, members) @post = post @members = members end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 |
# File 'app/commands/thredded/members_marked_notified.rb', line 9 def run members.each do |member| post.post_notifications.create(email: member.email) end end |