Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

chore(Routing): Replace with scope module for nicer routing paths

Kabiru Mwenjaa3992db28477
diff --git a/modules/storages/app/components/storages/admin/edit_form_header_component.html.erb b/modules/storages/app/components/storages/admin/edit_form_header_component.html.erb
index 5697d313de9..b5129d3b5ac 100644
--- a/modules/storages/app/components/storages/admin/edit_form_header_component.html.erb
+++ b/modules/storages/app/components/storages/admin/edit_form_header_component.html.erb
@@ -57,7 +57,7 @@ See COPYRIGHT and LICENSE files for more details.
tab_nav.with_tab(
selected: tab_selected?(:project_mappings),
- href: admin_settings_storage_projects_project_storages_path(@storage)
+ href: admin_settings_storage_project_storages_path(@storage)
) do |tab|
tab.with_text { t(:label_project_mappings) }
end
diff --git a/modules/storages/app/views/storages/admin/projects/project_storages/index.html.erb b/modules/storages/app/views/storages/admin/projects/project_storages/index.html.erb
index 82ce89b5aaa..9a0850f7930 100644
--- a/modules/storages/app/views/storages/admin/projects/project_storages/index.html.erb
+++ b/modules/storages/app/views/storages/admin/projects/project_storages/index.html.erb
@@ -41,7 +41,7 @@ See COPYRIGHT and LICENSE files for more details.
render(Primer::Beta::Button.new(
scheme: :primary,
tag: :a,
- href: new_admin_settings_storage_projects_project_storage_path(@storage),
+ href: new_admin_settings_storage_project_storage_path(@storage),
data: { controller: "async-dialog" }
)) do |button|
button.with_leading_visual_icon(icon: 'op-include-projects')
diff --git a/modules/storages/config/routes.rb b/modules/storages/config/routes.rb
index a8b268bb90b..774f79d5054 100644
--- a/modules/storages/config/routes.rb
+++ b/modules/storages/config/routes.rb
@@ -44,7 +44,7 @@ Rails.application.routes.draw do
resource :access_management, controller: "/storages/admin/access_management", only: %i[new create edit update]
- namespace :projects do
+ scope module: :projects do
resources :project_storages,
controller: "/storages/admin/projects/project_storages",
only: %i[index new create destroy]