]> git.openstreetmap.org Git - rails.git/blob - app/notifiers/note_comment_notifier.rb
Bump rubocop-capybara from 2.22.1 to 2.23.0 in the rubocop group
[rails.git] / app / notifiers / note_comment_notifier.rb
1 # frozen_string_literal: true
2
3 class NoteCommentNotifier < ApplicationNotifier
4   recipients -> { record.notifiable_subscribers }
5
6   validates :record, :presence => true
7
8   deliver_by :email do |config|
9     config.mailer = "UserMailer"
10     config.method = "note_comment_notification"
11     config.if = -> { recipient.notification_preferences.note_comment.include?("email") }
12   end
13 end