summaryrefslogtreecommitdiff
path: root/app/controllers/projects/tree_controller.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-10-09 20:07:29 +0300
committerValery Sizov <vsv2711@gmail.com>2015-10-13 20:12:34 +0300
commit8346dde0520ed625446ecc5d5a35b53e0b60dbb0 (patch)
treef2faa89dc934967921ddea7794a319333ea77c97 /app/controllers/projects/tree_controller.rb
parentfb8f604f1cdc2e114e3ebb55827353d07dd7778a (diff)
downloadgitlab-ce-8346dde0520ed625446ecc5d5a35b53e0b60dbb0.tar.gz
Only render 404 page from /publicinified_404_error
Diffstat (limited to 'app/controllers/projects/tree_controller.rb')
-rw-r--r--app/controllers/projects/tree_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index 7eaff1d61ee..bdcb1a3e297 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -10,7 +10,7 @@ class Projects::TreeController < Projects::ApplicationController
before_action :authorize_push_code!, only: [:create_dir]
def show
- return not_found! unless @repository.commit(@ref)
+ return render_404 unless @repository.commit(@ref)
if tree.entries.empty?
if @repository.blob_at(@commit.id, @path)
@@ -19,7 +19,7 @@ class Projects::TreeController < Projects::ApplicationController
File.join(@ref, @path))
) and return
elsif @path.present?
- return not_found!
+ return render_404
end
end
@@ -31,7 +31,7 @@ class Projects::TreeController < Projects::ApplicationController
end
def create_dir
- return not_found! unless @commit_params.values.all?
+ return render_404 unless @commit_params.values.all?
begin
result = Files::CreateDirService.new(@project, current_user, @commit_params).execute