Sha256: 20638b276c1e49a84e656683d3711816bb8164561b3d997d7adb8cff3c0d06f9
Contents?: true
Size: 611 Bytes
Versions: 16
Compression:
Stored size: 611 Bytes
Contents
module Marty module Notifications module CreateDeliveries class << self def call(notification:) configs(notification).map do |config| notification.deliveries.create!( state: :pending, delivery_type: config.delivery_type, recipient: config.recipient, text: config.text ) end end def configs(notification) Marty::Notifications::Config.where( state: :on, event_type: notification.event_type ) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems