]> source.dussan.org Git - redmine.git/commitdiff
Adds a deprecation warning to Mailer.deliver_*.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 5 May 2012 13:17:18 +0000 (13:17 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 5 May 2012 13:17:18 +0000 (13:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9639 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mailer.rb

index 75c9a3a32316afe64d733f6656b687d5c0f18acb..952c1caf7c16a5df3abe849eabd100d231e52e79 100644 (file)
@@ -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