File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
lib/action_dispatch/routing Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1571,6 +1571,12 @@ def match(path, *rest)
1571
1571
options = path
1572
1572
path , to = options . find { |name , _value | name . is_a? ( String ) }
1573
1573
1574
+ if path . nil?
1575
+ ActiveSupport ::Deprecation . warn 'Omitting the route path is deprecated. ' \
1576
+ 'Specify the path with a String or a Symbol instead.'
1577
+ path = ''
1578
+ end
1579
+
1574
1580
case to
1575
1581
when Symbol
1576
1582
options [ :action ] = to
Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ def test_pagemarks
402
402
post "create" , :as => ""
403
403
put "update"
404
404
get "remove" , :action => :destroy , :as => :remove
405
+ tc . assert_deprecated do
406
+ get action : :show , as : :show
407
+ end
405
408
end
406
409
end
407
410
@@ -420,6 +423,10 @@ def test_pagemarks
420
423
get '/pagemark/remove'
421
424
assert_equal 'pagemarks#destroy' , @response . body
422
425
assert_equal '/pagemark/remove' , pagemark_remove_path
426
+
427
+ get '/pagemark'
428
+ assert_equal 'pagemarks#show' , @response . body
429
+ assert_equal '/pagemark' , pagemark_show_path
423
430
end
424
431
425
432
def test_admin
You can’t perform that action at this time.
0 commit comments