Simplify User.comment_notifiable scope

This commit is contained in:
Andrew Kvalheim 2022-03-31 17:30:50 -07:00
parent c9f410e68a
commit 9d4af0dcd3
4 changed files with 8 additions and 10 deletions

View file

@ -4,9 +4,7 @@ class EventCommentMailJob < ApplicationJob
queue_as :default
def perform(comment)
conference = comment.commentable.program.conference
User.comment_notifiable(conference).each do |user|
User.comment_notifiable(comment.conference_id).each do |user|
Mailbot.event_comment_mail(comment, user).deliver_now
end
end