Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

@cristianbica
Copy link
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
@cristianbica cristianbica force-pushed the cristianbica:actionmailer-deprecate-deliver branch 2 times, most recently Aug 20, 2014
@rafaelfranca
rafaelfranca reviewed Aug 20, 2014
View changes
actionmailer/lib/action_mailer/message_delivery.rb Outdated
@@ -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.

Copy link
@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 reviewed Aug 20, 2014
View changes
actionmailer/lib/action_mailer/message_delivery.rb Outdated
__getobj__
end

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

This comment has been minimized.

Copy link
@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 reviewed Aug 20, 2014
View changes
actionmailer/lib/action_mailer/message_delivery.rb Outdated
enqueue_delivery :deliver_now, options
end

# Delivers a message.The message will be sent bypassing checking perform_deliveries

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Aug 20, 2014

Member

Missing space after the .

@rafaelfranca
rafaelfranca reviewed Aug 20, 2014
View changes
actionmailer/lib/action_mailer/message_delivery.rb Outdated
message.deliver
end

# <b>DEPRECATED:</b> use <tt>deliver_now!</tt> instead

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Aug 20, 2014

Member

Deprecated method are not documented.

@rafaelfranca
rafaelfranca reviewed Aug 20, 2014
View changes
actionmailer/lib/action_mailer/message_delivery.rb Outdated
enqueue_method = :enqueue_in
args.unshift options[:in]

def enqueue_delivery(delivery_method, options={}) #:nodoc:

This comment has been minimized.

Copy link
@rafaelfranca

rafaelfranca Aug 20, 2014

Member

No need to nodoc for private methods

@rafaelfranca
rafaelfranca reviewed Aug 20, 2014
View changes
actionmailer/lib/action_mailer/message_delivery.rb Outdated
# 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.

Copy link
@rafaelfranca

rafaelfranca Aug 20, 2014

Member

missing . in the end.

@cristianbica cristianbica force-pushed the cristianbica:actionmailer-deprecate-deliver branch to 9e7f4a9 Aug 20, 2014
@cristianbica
Copy link
Member Author

cristianbica commented Aug 20, 2014

@rafaelfranca fixed all your comments

rafaelfranca added a commit that referenced this pull request Aug 20, 2014
…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
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
`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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.