Create and use project path helpers that only need a project, no namespace
Alternative to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12537.
The magic is in config/application.rb
. All other changes are just to use those new helpers: https://gitlab.com/gitlab-org/gitlab-ce/blob/dm-project-path-helpers-try-2/config/application.rb#L166-184
I've also added a cop to enforce this use in the future: https://gitlab.com/gitlab-org/gitlab-ce/blob/dm-project-path-helpers-try-2/rubocop/cop/project_path_helper.rb (spec: https://gitlab.com/gitlab-org/gitlab-ce/blob/dm-project-path-helpers-try-2/spec/rubocop/cop/project_path_helper_spec.rb)
EE port: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2336
Edited by Takuya Noguchi