diff --git a/activemodel/lib/active_model/mass_assignment_security/sanitizer.rb b/activemodel/lib/active_model/mass_assignment_security/sanitizer.rb index bbdddfb50ddb0..caf2a25573b03 100644 --- a/activemodel/lib/active_model/mass_assignment_security/sanitizer.rb +++ b/activemodel/lib/active_model/mass_assignment_security/sanitizer.rb @@ -1,5 +1,3 @@ -require 'active_support/core_ext/module/delegation' - module ActiveModel module MassAssignmentSecurity class Sanitizer @@ -26,13 +24,15 @@ def process_removed_attributes(attrs) end class LoggerSanitizer < Sanitizer - delegate :logger, :to => :@target - def initialize(target) @target = target super end + def logger + @target.logger + end + def logger? @target.respond_to?(:logger) && @target.logger end