Skip to content
Snippets Groups Projects
Commit e7cea8cd authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Avoid path helper name clash

parent 2a9a9e14
No related branches found
No related tags found
1 merge request!3361Dismantling Grack::Auth part 1: Git HTTP clients
Loading
@@ -23,8 +23,8 @@ class Projects::ApplicationController < ApplicationController
Loading
@@ -23,8 +23,8 @@ class Projects::ApplicationController < ApplicationController
@project = find_project @project = find_project
   
if @project && can?(current_user, :read_project, @project) if @project && can?(current_user, :read_project, @project)
if @project.path_with_namespace != project_path if @project.path_with_namespace != path_with_namespace
redirect_to request.original_url.gsub(project_path, @project.path_with_namespace) redirect_to request.original_url.gsub(path_with_namespace, @project.path_with_namespace)
end end
else else
@project = nil @project = nil
Loading
@@ -48,12 +48,12 @@ class Projects::ApplicationController < ApplicationController
Loading
@@ -48,12 +48,12 @@ class Projects::ApplicationController < ApplicationController
params[:namespace_id] params[:namespace_id]
end end
def project_path def path_with_namespace
"#{namespace}/#{id}" "#{namespace}/#{id}"
end end
def find_project def find_project
Project.find_with_namespace(project_path) Project.find_with_namespace(path_with_namespace)
end end
   
def repository def repository
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment