summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-04-15 11:22:08 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-04-15 11:29:20 +0200
commite7cea8cd75aa23ad4eb9705ddb0871775d65309b (patch)
tree1cfb7ae95a5a595ea3485286c103eb7085a4ac85
parent2a9a9e147b8ccfbc974e9817d69c6a28c484772f (diff)
downloadgitlab-ce-e7cea8cd75aa23ad4eb9705ddb0871775d65309b.tar.gz
Avoid path helper name clash
-rw-r--r--app/controllers/projects/application_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
index 275e94d39ed..817727d7868 100644
--- a/app/controllers/projects/application_controller.rb
+++ b/app/controllers/projects/application_controller.rb
@@ -23,8 +23,8 @@ class Projects::ApplicationController < ApplicationController
@project = find_project
if @project && can?(current_user, :read_project, @project)
- if @project.path_with_namespace != project_path
- redirect_to request.original_url.gsub(project_path, @project.path_with_namespace)
+ if @project.path_with_namespace != path_with_namespace
+ redirect_to request.original_url.gsub(path_with_namespace, @project.path_with_namespace)
end
else
@project = nil
@@ -48,12 +48,12 @@ class Projects::ApplicationController < ApplicationController
params[:namespace_id]
end
- def project_path
+ def path_with_namespace
"#{namespace}/#{id}"
end
def find_project
- Project.find_with_namespace(project_path)
+ Project.find_with_namespace(path_with_namespace)
end
def repository