Files
x-stake/app/models/concerns/notifiable.rb
2021-08-17 10:04:24 -03:00

19 lines
301 B
Ruby

# 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