Skip to content

Commit

Permalink
just implement the delegate method
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jan 4, 2012
1 parent b899b7b commit 54b4e8e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'active_support/core_ext/module/delegation'

module ActiveModel
module MassAssignmentSecurity
class Sanitizer
Expand All @@ -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
Expand Down

0 comments on commit 54b4e8e

Please sign in to comment.