We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca77677 commit 1573a16Copy full SHA for 1573a16
lib/log_struct/integrations/action_mailer/callbacks.rb
@@ -16,7 +16,12 @@ module Callbacks
16
# This will be handled by ActiveSupport::Concern at runtime
17
included do
18
include ::ActiveSupport::Callbacks
19
- define_callbacks :deliver, skip_after_callbacks_if_terminated: true
+ # Rails < 7.1 does not support skip_after_callbacks_if_terminated option
20
+ if defined?(::ActiveSupport) && ::ActiveSupport.gem_version >= Gem::Version.new("7.1.0")
21
+ define_callbacks :deliver, skip_after_callbacks_if_terminated: true
22
+ else
23
+ define_callbacks :deliver
24
+ end
25
end
26
27
# Define class methods in a separate module
0 commit comments