PERF: Memoize `SkippedEmailLog.reason_types`.
This commit is contained in:
parent
2c70d3f443
commit
7c69fa8cfd
|
@ -12,7 +12,7 @@ class SkippedEmailLog < ActiveRecord::Base
|
|||
validate :ensure_valid_reason_type
|
||||
|
||||
def self.reason_types
|
||||
Enum.new(
|
||||
@types ||= Enum.new(
|
||||
custom: 1,
|
||||
exceeded_emails_limit: 2,
|
||||
exceeded_bounces_limit: 3,
|
||||
|
|
Loading…
Reference in New Issue