render blob/show if not show_new_repo?

This commit is contained in:
Luke "Jared" Bennett 2017-07-28 19:40:12 +01:00
parent 98003eade2
commit 2a6f1b32dd
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2

View file

@ -4,6 +4,7 @@ class Projects::BlobController < Projects::ApplicationController
include CreatesCommit
include RendersBlob
include ActionView::Helpers::SanitizeHelper
include ApplicationHelper
# Raised when given an invalid file path
InvalidPathError = Class.new(StandardError)
@ -40,7 +41,7 @@ class Projects::BlobController < Projects::ApplicationController
assign_ref_vars
@last_commit = @repository.last_commit_for_path(@commit.id, tree.path) || @commit
render 'projects/tree/show'
show_new_repo? ? render('projects/tree/show') : render('show')
end
format.json do