Commit 50891701 authored by Douwe Maan's avatar Douwe Maan

Move 'groups/*id' routes before 'groups/*group_id' routes

parent e5fe49ed
......@@ -2,6 +2,18 @@ require 'constraints/group_url_constrainer'
resources :groups, only: [:index, :new, :create]
scope(path: 'groups/*id',
controller: :groups,
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
get :edit, as: :edit_group
get :issues, as: :issues_group
get :merge_requests, as: :merge_requests_group
get :projects, as: :projects_group
get :activity, as: :activity_group
get :subgroups, as: :subgroups_group
get '/', action: :show, as: :group_canonical
end
scope(path: 'groups/*group_id',
module: :groups,
as: :group,
......@@ -70,18 +82,6 @@ scope(path: 'groups/*group_id',
get :boards, to: redirect('/groups/%{group_id}/-/boards')
end
scope(path: 'groups/*id',
controller: :groups,
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
get :edit, as: :edit_group
get :issues, as: :issues_group
get :merge_requests, as: :merge_requests_group
get :projects, as: :projects_group
get :activity, as: :activity_group
get :subgroups, as: :subgroups_group
get '/', action: :show, as: :group_canonical
end
constraints(GroupUrlConstrainer.new) do
scope(path: '*id',
as: :group,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment