diff --git a/lib/crm/core/log_subscriber.rb b/lib/crm/core/log_subscriber.rb index 0288a3d..79910e0 100644 --- a/lib/crm/core/log_subscriber.rb +++ b/lib/crm/core/log_subscriber.rb @@ -1,4 +1,8 @@ -require "active_support/parameter_filter" +if ActiveSupport.version >= Gem::Version.new("6.0.0") + require "active_support/parameter_filter" +else + require "action_dispatch" +end module Crm; module Core class LogSubscriber < ActiveSupport::LogSubscriber @@ -35,7 +39,12 @@ def establish_connection(event) private def parameter_filter - @parameter_filter ||= ::ActiveSupport::ParameterFilter.new(['password']) + @parameter_filter ||= + if ActiveSupport.version >= Gem::Version.new("6.0.0") + ::ActiveSupport::ParameterFilter.new(['password']) + else + ::ActionDispatch::Http::ParameterFilter.new(['password']) + end end end end; end