Commit 3dd6cebc authored by Robert Speicher's avatar Robert Speicher

Merge branch 'dz-scope-profile-routes' into 'master'

Copy profile route under - scope

See merge request gitlab-org/gitlab!45045
parents 25cfc674 62282ba5
---
title: Copy profile route under - scope
merge_request: 45045
author:
type: other
......@@ -274,6 +274,14 @@ Rails.application.routes.draw do
draw :snippets
end
# Serve profile routes under /-/ scope.
# To ensure an old unscoped routing is used for the UI we need to
# add prefix 'as' to the scope routing and place it below original routing.
# Issue https://gitlab.com/gitlab-org/gitlab/-/issues/210024
scope '-', as: :scoped do
draw :profile
end
root to: "root#index"
get '*unmatched_route', to: 'application#route_not_found'
......
......@@ -133,6 +133,10 @@ RSpec.describe ProfilesController, "routing" do
it "to #show" do
expect(get("/profile")).to route_to('profiles#show')
end
it 'to #show from scope routing' do
expect(get("/-/profile")).to route_to('profiles#show')
end
end
# profile_preferences GET /profile/preferences(.:format) profiles/preferences#show
......
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