Adds a deprecation warning to Mailer.deliver_*.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9639 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-05-05 13:17:18 +00:00
parent 7af8d7caf0
commit 6fc909a402
1 changed files with 1 additions and 0 deletions

View 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