2023-01-11 09:37:26 +01:00
|
|
|
class SafeMailer < ApplicationRecord
|
|
|
|
before_create do
|
|
|
|
raise if SafeMailer.count == 1
|
|
|
|
end
|
|
|
|
|
2023-01-11 20:24:57 +01:00
|
|
|
enum forced_delivery_method: (Rails.application.config.action_mailer&.balancer_settings&.keys || []).to_h { |k| [k.to_sym, k.to_s] }
|
2023-01-11 10:59:58 +01:00
|
|
|
|
2023-01-11 09:37:26 +01:00
|
|
|
def self.forced_delivery_method
|
|
|
|
first&.forced_delivery_method
|
|
|
|
end
|
|
|
|
end
|