gitlab-org--gitlab-foss/config/routes
Timothy Andrew 86f4767dc1 Fix 500 error while navigating to the pages_domains 'show' page.
==================
= Implementation =
==================

1. The path of the page is of the form 'group/project/pages/domains/<domain_name>'
2. Rails looks at `params[:id]` (which should be the domain name), and finds the
   relevant model record.
3. Given a domain like `foo.bar`, Rails sets `params[:id]` to `foo` (should be
   `foo.bar`), and sets `params[:format]` to `bar`
4. This commit fixes the issue by adding a route constraint, so that
   `params[:id]` is set to the entire `foo.bar` domain name.

=========
= Tests =
=========

1. Add controller specs for the `PagesDomainController`. These are
   slightly orthogonal to this bug fix (they don't fail when this bug is
   present), but should be present nonetheless.
2. Add routing specs that catch this bug (by asserting that the `id`
   param is passed as expected when it contains a domain name).
3. Modify the 'RESTful project resources' routing spec shared example to
   accomodate controllers where the controller path (such as
   `pages/domains`) is different from the controller name (such as
   `pages_domains`).
2017-01-31 22:55:33 +00:00
..
admin.rb Merged the 'groups' and 'projects' tabs when viewing user profiles 2016-12-29 22:42:16 +00:00
api.rb Cleanup config/routes.rb even further by extracting more routes into separate files 2016-10-05 18:43:47 +03:00
ci.rb Cleanup config/routes.rb even further by extracting more routes into separate files 2016-10-05 18:43:47 +03:00
dashboard.rb
development.rb Cleanup config/routes.rb even further by extracting more routes into separate files 2016-10-05 18:43:47 +03:00
explore.rb
git_http.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00
group.rb Fix 500 error for Group#web_url method if nested group 2017-01-24 17:44:21 +02:00
help.rb Cleanup config/routes.rb even further by extracting more routes into separate files 2016-10-05 18:43:47 +03:00
import.rb Rename Gogs to Gitea, DRY the controller and improve views 2016-12-19 17:35:51 +01:00
profile.rb Create relation between chat user and GitLab user and allow to authorize them [ci skip] 2016-11-16 13:42:35 +01:00
project.rb Fix 500 error while navigating to the pages_domains 'show' page. 2017-01-31 22:55:33 +00:00
repository.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00
sherlock.rb Cleanup config/routes.rb even further by extracting more routes into separate files 2016-10-05 18:43:47 +03:00
sidekiq.rb Cleanup config/routes.rb even further by extracting more routes into separate files 2016-10-05 18:43:47 +03:00
snippets.rb Added 'Download' button to snippet view 2016-10-11 15:36:59 -04:00
uploads.rb
user.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00
wiki.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00