Deprecated ActionMailer .deliver and updated ActionMailer / ActiveJob docs/guide #16582

Merged
merged 2 commits into from Aug 20, 2014

Conversation

Projects
None yet
2 participants
@cristianbica
Member

cristianbica commented Aug 20, 2014

  • SomeMailer.some_email(*args).deliver is deprecated in favour of .deliver_now. (context #16549)
  • Updated / Added rdoc for ActionMailer(Base, MessageDelivery)
  • Updated guides, changelog, readme, release notes
@@ -1,45 +1,117 @@
require 'delegate'
module ActionMailer
+
+ # The ActionMailer::MessageDeliver class is used by ActionMailer::Base when creating a new mailer. You
+ # should not instantiate MessageDelivery directly. MessageDeliver is a wrapper (Delegator subclass)

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

I believe it is better to remove the part where we enforce that users should not create it. If users want to create they will despite our recommendation or not 😄. Also the initialize method is already with nodoc.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

I believe it is better to remove the part where we enforce that users should not create it. If users want to create they will despite our recommendation or not 😄. Also the initialize method is already with nodoc.

__getobj__
end
+ # Enqueues the message to be delivered through ActiveJob (using the ActionMailer::DeliveryJob

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

We don't need to tell which class is. Even more because we are not documenting it.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

We don't need to tell which class is. Even more because we are not documenting it.

+ enqueue_delivery :deliver_now, options
+ end
+
+ # Delivers a message.The message will be sent bypassing checking perform_deliveries

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

Missing space after the .

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

Missing space after the .

+ message.deliver
+ end
+
+ # <b>DEPRECATED:</b> use <tt>deliver_now!</tt> instead

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

Deprecated method are not documented.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

Deprecated method are not documented.

- enqueue_method = :enqueue_in
- args.unshift options[:in]
+
+ def enqueue_delivery(delivery_method, options={}) #:nodoc:

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

No need to nodoc for private methods

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

No need to nodoc for private methods

+ # Delivers a message.
+ def deliver
+ ActiveSupport::Deprecation.warn "#deliver is deprecated and will be removed in Rails 5. " \
+ "Use #deliver_now to deliver immediately or #deliver_later to deliver through ActiveJob"

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

missing . in the end.

@rafaelfranca

rafaelfranca Aug 20, 2014

Member

missing . in the end.

@cristianbica

This comment has been minimized.

Show comment
Hide comment
@cristianbica

cristianbica Aug 20, 2014

Member

@rafaelfranca fixed all your comments

Member

cristianbica commented Aug 20, 2014

@rafaelfranca fixed all your comments

rafaelfranca added a commit that referenced this pull request Aug 20, 2014

Merge pull request #16582 from cristianbica/actionmailer-deprecate-de…
…liver

Deprecated ActionMailer .deliver and updated ActionMailer / ActiveJob docs/guide

@rafaelfranca rafaelfranca merged commit 0baed94 into rails:master Aug 20, 2014

1 check was pending

continuous-integration/travis-ci The Travis CI build is in progress
Details

@cristianbica cristianbica deleted the cristianbica:actionmailer-deprecate-deliver branch Aug 24, 2014

reefdog added a commit to documentcloud/documentcloud that referenced this pull request Apr 28, 2016

Chang remaining `deliver`s to `deliver_now`s
`deliver` has been deprecated and will be removed in Rails 5: rails/rails#16582

Closes #385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment