Skip to content

Commit d34bd0d

Browse files
authored
Merge pull request rails#33974 from rails/remove-catch-all-from-am
This patch removes deprecated catch-all routes from AM
2 parents 6d698fd + fefcb36 commit d34bd0d

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

actionmailer/test/url_test.rb

+7-17
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ class WelcomeController < ActionController::Base
88

99
AppRoutes = ActionDispatch::Routing::RouteSet.new
1010

11-
class ActionMailer::Base
12-
include AppRoutes.url_helpers
11+
AppRoutes.draw do
12+
get "/welcome" => "foo#bar", as: "welcome"
13+
get "/dummy_model" => "foo#baz", as: "dummy_model"
14+
get "/welcome/greeting", to: "welcome#greeting"
15+
get "/a/b(/:id)", to: "a#b"
1316
end
1417

1518
class UrlTestMailer < ActionMailer::Base
19+
include AppRoutes.url_helpers
20+
1621
default_url_options[:host] = "www.basecamphq.com"
1722

1823
configure do |c|
@@ -80,14 +85,6 @@ def setup
8085
def test_url_for
8186
UrlTestMailer.delivery_method = :test
8287

83-
AppRoutes.draw do
84-
ActiveSupport::Deprecation.silence do
85-
get ":controller(/:action(/:id))"
86-
get "/welcome" => "foo#bar", as: "welcome"
87-
get "/dummy_model" => "foo#baz", as: "dummy_model"
88-
end
89-
end
90-
9188
# string
9289
assert_url_for "http://foo/", "http://foo/"
9390

@@ -111,13 +108,6 @@ def test_url_for
111108
def test_signed_up_with_url
112109
UrlTestMailer.delivery_method = :test
113110

114-
AppRoutes.draw do
115-
ActiveSupport::Deprecation.silence do
116-
get ":controller(/:action(/:id))"
117-
get "/welcome" => "foo#bar", as: "welcome"
118-
end
119-
end
120-
121111
expected = new_mail
122112
expected.to = @recipient
123113
expected.subject = "[Signed up] Welcome #{@recipient}"

0 commit comments

Comments
 (0)