Skip to content

Commit 638ed3d

Browse files
committed
fix(routes): Use keyword arguments over options hash
`namespace` is broken with a options hash and creates double nested `admin/admin` routes and `scope` emits an deprecation warning.
1 parent 9a32738 commit 638ed3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/routes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
get "/sitemap.xml", to: "pages#sitemap", format: "xml"
99

10-
scope Alchemy.admin_path, {constraints: Alchemy.admin_constraints} do
10+
scope Alchemy.admin_path, constraints: Alchemy.admin_constraints do
1111
get "/", to: redirect("#{Alchemy.admin_path}/dashboard"), as: :admin
1212
get "/dashboard", to: "admin/dashboard#index", as: :admin_dashboard
1313
get "/dashboard/info", to: "admin/dashboard#info", as: :dashboard_info
@@ -16,7 +16,7 @@
1616
get "/leave", to: "admin/base#leave", as: :leave_admin
1717
end
1818

19-
namespace :admin, {path: Alchemy.admin_path, constraints: Alchemy.admin_constraints} do
19+
namespace :admin, path: Alchemy.admin_path, constraints: Alchemy.admin_constraints do
2020
resources :nodes
2121

2222
resources :pages do

0 commit comments

Comments
 (0)