add slack notifications

This commit is contained in:
João Geonizeli
2021-08-17 10:04:24 -03:00
parent 559b239c02
commit 0b7cdeb236
9 changed files with 68 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
# frozen_string_literal: true
module Notifiable
extend ActiveSupport::Concern
included do
after_commit on: :create do
SlackNotifier.ping(notification_message)
end
end
private
def notification_message
raise NotImplementedError, "method should be implemented"
end
end