ensure silence method exists

This commit is contained in:
John Bintz 2011-05-25 11:08:24 -04:00
parent 0b5075a741
commit 22b767853d

View File

@ -20,7 +20,11 @@ if Rails.env.development? || Rails.env.test?
eval <<-METHOD
def #{m1}_with_silencer#{m2}(*args)
@logger.silence do
if @logger.respond_to?(:silence)
@logger.silence do
#{m1}_without_silencer#{m2}(*args)
end
else
#{m1}_without_silencer#{m2}(*args)
end
end