8yjt0a
Last Updated: February 25, 2016
·
1.666K
· rbmrclo
2fe1468f365b2c131b38e87aa4acb601

[ActionMailer] method`.deliver` is already deprecated, use this instead.

I know that this might be too early for a sudden update of your code but it could be a good practice to start using .deliver_now or .deliver_later on your projects when using ActionMailer since .deliver is already deprecated.

# Source: https://github.com/rails/rails/blob/master/actionmailer/lib/action_mailer/message_delivery.rb#L85-L95

def deliver! #:nodoc:
  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 Active Job."
  deliver_now!
end

def deliver #:nodoc:
  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 Active Job."
  deliver_now
 end
Say Thanks
Respond