aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-08-07 13:59:31 -0300
committerJosé Valim <jose.valim@gmail.com>2012-08-07 14:00:54 -0300
commit485e655082c4ddbcde7788b3eac4bb8281b37d27 (patch)
tree0e1001009001d66a13a685d2a3097099e8b7bbe4 /actionmailer/lib
parent666d3fd0c156a5c47eeddfe87dc466863890ba70 (diff)
downloadrails-485e655082c4ddbcde7788b3eac4bb8281b37d27.tar.gz
rails-485e655082c4ddbcde7788b3eac4bb8281b37d27.tar.bz2
rails-485e655082c4ddbcde7788b3eac4bb8281b37d27.zip
Revert "Merge pull request #7202 from asanghi/perform_deliveries_in_mail"
Reverting because it feels backward to specify a delivery to not be performed while the e-mail is being composed. It is simpler (and makes more sense) to delegate the responsibility to the calling code.
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb2
-rw-r--r--actionmailer/lib/action_mailer/delivery_methods.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 73ac8ea12b..900da9697e 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -683,7 +683,7 @@ module ActionMailer #:nodoc:
m.charset = charset = headers[:charset]
# Set configure delivery behavior
- wrap_delivery_behavior!(headers.delete(:delivery_method),headers.delete(:perform_deliveries))
+ wrap_delivery_behavior!(headers.delete(:delivery_method))
# Assign all headers except parts_order, content_type and body
assignable = headers.except(:parts_order, :content_type, :body, :template_name, :template_path)
diff --git a/actionmailer/lib/action_mailer/delivery_methods.rb b/actionmailer/lib/action_mailer/delivery_methods.rb
index 0b8d0019eb..3b38dbccc7 100644
--- a/actionmailer/lib/action_mailer/delivery_methods.rb
+++ b/actionmailer/lib/action_mailer/delivery_methods.rb
@@ -57,7 +57,7 @@ module ActionMailer
self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze
end
- def wrap_delivery_behavior(mail, method=nil, perform_deliveries_header=nil) #:nodoc:
+ def wrap_delivery_behavior(mail, method=nil) #:nodoc:
method ||= self.delivery_method
mail.delivery_handler = self
@@ -74,7 +74,7 @@ module ActionMailer
mail.delivery_method(method)
end
- mail.perform_deliveries = perform_deliveries && (perform_deliveries_header.nil? || perform_deliveries_header)
+ mail.perform_deliveries = perform_deliveries
mail.raise_delivery_errors = raise_delivery_errors
end
end