Could be faster when params[:path] is missing

This commit is contained in:
Lin Jen-Shin 2016-07-12 23:26:30 +08:00
parent e383254070
commit 57c72cb0df
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def search
url = namespace_project_build_url(project.namespace, project, build)
if params[:path]
url = namespace_project_build_url(project.namespace, project, build)
redirect_to "#{url}/artifacts/#{params[:path]}"
else
render_404