Skip to content

Commit

Permalink
Remove deprecated ActionMailer deliver & deliver!
Browse files Browse the repository at this point in the history
These methods were deprecated in Rails 4.2 (see f4ee114) so they can
be safely removed in Rails 5.0.
  • Loading branch information
claudiob authored and rafaelfranca committed Jan 4, 2015
1 parent 5f777e4 commit 755dcd0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 39 deletions.
4 changes: 4 additions & 0 deletions actionmailer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Remove deprecated `deliver` and `deliver!` methods.

*claudiob*

* Template lookup now respects default locale and I18n fallbacks.

Given the following templates:
Expand Down
20 changes: 0 additions & 20 deletions actionmailer/lib/action_mailer/message_delivery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,6 @@ def deliver_now
message.deliver
end

def deliver! #:nodoc:
ActiveSupport::Deprecation.warn(<<-MSG.squish)
`#deliver!` is deprecated and will be removed in Rails 5. Use
`#deliver_now!` to deliver immediately or `#deliver_later!` to
deliver through Active Job.
MSG

deliver_now!
end

def deliver #:nodoc:
ActiveSupport::Deprecation.warn(<<-MSG.squish)
`#deliver` is deprecated and will be removed in Rails 5. Use
`#deliver_now` to deliver immediately or `#deliver_later` to
deliver through Active Job.
MSG

deliver_now
end

private

def enqueue_delivery(delivery_method, options={})
Expand Down
19 changes: 0 additions & 19 deletions actionmailer/test/message_delivery_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,6 @@ class MessageDeliveryTest < ActiveSupport::TestCase
assert_equal Mail::Message , @mail.message.class
end

test 'should respond to .deliver' do
assert_respond_to @mail, :deliver
end

test 'should respond to .deliver!' do
assert_respond_to @mail, :deliver!
end

test '.deliver is deprecated' do
assert_deprecated do
@mail.deliver
end
end
test '.deliver! is deprecated' do
assert_deprecated do
@mail.deliver!
end
end

test 'should respond to .deliver_later' do
assert_respond_to @mail, :deliver_later
end
Expand Down

0 comments on commit 755dcd0

Please sign in to comment.