1. 23 Dec, 2016 2 commits
    • Timothy Andrew's avatar
      Add CHANGELOG entry for !993. · 4c0c368a
      Timothy Andrew authored
      4c0c368a
    • Timothy Andrew's avatar
      Fix 500 error while navigating to the `pages_domains` 'show' page. · d34d918d
      Timothy Andrew authored
      ==================
      = 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`).
      d34d918d
  2. 21 Dec, 2016 10 commits
  3. 20 Dec, 2016 17 commits
  4. 19 Dec, 2016 11 commits