• Stan Hu's avatar
    Fix issue redirects going to /issues/:id/designs · 05533458
    Stan Hu authored
    When a project is redirected to a new project, Rails attempts to
    construct the proper URL in `url_for` by finding the first route that
    matches the given parameters. In this case, `namespace_id`,
    `project_id`, `id` matched the `/designs` route first, so it used that.
    
    This happens because the Rails `resources` block defines all the
    standard #index, #show, #update, etc. routes after the block runs.
    
    To ensure that `/issues/:id` is used to display an issue, we need to use
    a separate action for `/issues/:id/designs`.
    
    Closes https://gitlab.com/gitlab-org/gitlab/issues/31357
    05533458
issues_controller_spec.rb 10 KB