Class: Thredded::MembersMarkedNotified

Inherits:
Object
  • Object
show all
Defined in:
app/commands/thredded/members_marked_notified.rb

Instance Method Summary collapse

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

#runObject



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