Permalink
Browse files

just implement the delegate method

  • Loading branch information...
1 parent b899b7b commit 54b4e8e8d6a6bb5b8a27f2e9a6dbbc1a47fea4a0 @tenderlove tenderlove committed Jan 4, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 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

0 comments on commit 54b4e8e

Please sign in to comment.