Skip to content

Commit 1667d68

Browse files
committed
Removes the redirect to the root path for /dashboards
This route is sort of duplicated with the root route in the `avo-dashboards` gem which defines a similarly unused route by default. Having two identically named routes may result in unpredictable behaviour outside of Avo when named routes are being used for things like client-side routing.
1 parent 3202871 commit 1667d68

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
@@ -1,8 +1,8 @@
11
Avo::Engine.routes.draw do
22
root "home#index"
33

4-
get "resources", to: redirect(Avo.configuration.root_path)
5-
get "dashboards", to: redirect(Avo.configuration.root_path)
4+
get "resources", to: redirect(Avo.configuration.root_path), as: :avo_resources_redirect
5+
get "dashboards", to: redirect(Avo.configuration.root_path), as: :avo_dashboards_redirect
66

77
resources :media_library, only: [:index, :show, :update, :destroy], path: "media-library"
88
get "attach-media", to: "media_library#attach"

0 commit comments

Comments
 (0)