1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
# To deliver this notification:
#
# <%= class_name %>Notifier.with(record: @post, message: "New post").deliver(User.all)
class <%= class_name %>Notifier < ApplicationNotifier
# Add your delivery methods
#
# deliver_by :email do |config|
# config.mailer = "UserMailer"
# config.method = "new_post"
# end
#
# bulk_deliver_by :slack do |config|
# config.url = -> { Rails.application.credentials.slack_webhook_url }
# end
#
# deliver_by :custom do |config|
# config.class = "MyDeliveryMethod"
# end
# Add required params
#
# required_param :message
# Compute recipients without having to pass them in
#
# recipients do
# params[:record].thread.all_authors
# end
end
|