From: Jean-Philippe Lang Date: Sat, 5 May 2012 13:17:18 +0000 (+0000) Subject: Adds a deprecation warning to Mailer.deliver_*. X-Git-Tag: 2.0.0~45 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6fc909a40267413f79f976dda8a2b05cde656159;p=redmine.git Adds a deprecation warning to Mailer.deliver_*. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9639 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 75c9a3a32..952c1caf7 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -422,6 +422,7 @@ class Mailer < ActionMailer::Base def self.method_missing(method, *args, &block) if m = method.to_s.match(%r{^deliver_(.+)$}) + ActiveSupport::Deprecation.warn "Mailer.deliver_#{m[1]}(*args) is deprecated. Use Mailer.#{m[1]}(*args).deliver instead." send(m[1], *args).deliver else super