Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Support `Mailer.deliver_foo(*args)` as a synonym for `Mailer.…

…foo(*args).deliver`."

This reverts commit 7e0cf56.

Conflicts:
	actionmailer/CHANGELOG.md

See discussion at
7e0cf56#commitcomment-2075489
  • Loading branch information...
commit 7e17b0baec4ea811c1a7e3bd491eaedf95b1feb4 1 parent e0fb16b
@jonleighton jonleighton authored
View
5 actionmailer/CHANGELOG.md
@@ -5,11 +5,6 @@
*Yves Senn*
-* Support `Mailer.deliver_foo(*args)` as a synonym for
- `Mailer.foo(*args).deliver`. This makes it easy to write e.g.
- `Mailer.expects(:deliver_foo)` when testing code that calls
- the mailer. *Jon Leighton*
-
* Allow delivery method options to be set per mail instance *Aditya Sanghi*
If your smtp delivery settings are dynamic,
View
3  actionmailer/lib/action_mailer/base.rb
@@ -142,7 +142,6 @@ module ActionMailer
# for delivery later:
#
# Notifier.welcome(david).deliver # sends the email
- # Notifier.deliver_welcome(david) # synonym for the former
# mail = Notifier.welcome(david) # => a Mail::Message object
# mail.deliver # sends the email
#
@@ -488,8 +487,6 @@ def set_payload_for_mail(payload, mail) #:nodoc:
def method_missing(method_name, *args)
if action_methods.include?(method_name.to_s)
QueuedMessage.new(queue, self, method_name, *args)
- elsif method_name.to_s =~ /^deliver_(.+)$/ && action_methods.include?($1)
- public_send($1, *args).deliver
else
super
end
View
7 actionmailer/test/base_test.rb
@@ -668,13 +668,6 @@ def welcome
assert_equal ["robert.pankowecki@gmail.com"], DefaultFromMailer.welcome.from
end
- test "Mailer.deliver_welcome calls Mailer.welcome.deliver" do
- BaseMailer.deliveries.clear
- BaseMailer.deliver_welcome(subject: 'omg')
- assert_equal 1, BaseMailer.deliveries.length
- assert_equal 'omg', BaseMailer.deliveries.first.subject
- end
-
protected
# Execute the block setting the given values and restoring old values after

1 comment on commit 7e17b0b

Please sign in to comment.
Something went wrong with that request. Please try again.