gitlab-org--gitlab-foss/config/routes/wiki.rb
Luke Duncalfe 93a618f0e5 New wiki page redirects user to random slug
Previously we asked a user to enter a new slug before taking them to
the Create Page page.

As a UX improvement, we now take them to a randomly generated URI so
they can begin creating their new page.

https://gitlab.com/gitlab-org/gitlab-ce/issues/46299
2019-08-21 09:33:12 +12:00

18 lines
438 B
Ruby

scope(controller: :wikis) do
scope(path: 'wikis', as: :wikis) do
get :git_access
get :pages
get :new
get '/', to: redirect('%{namespace_id}/%{project_id}/wikis/home')
post '/', to: 'wikis#create'
end
scope(path: 'wikis/*id', as: :wiki, format: false) do
get :edit
get :history
post :preview_markdown
get '/', action: :show
put '/', action: :update
delete '/', action: :destroy
end
end