Commit dd8afbf0 authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent 6953d988
......@@ -37,8 +37,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def latest_succeeded
path = ref_name_and_path.last
target_path = artifacts_action_path(path, project, build)
target_path = artifacts_action_path(@path, project, build)
if target_path
redirect_to(target_path)
......@@ -63,17 +62,13 @@ class Projects::ArtifactsController < Projects::ApplicationController
def build_from_ref
if params[:ref_name_and_path]
ref_name = ref_name_and_path.first
ref_name, @path = extract_ref(params[:ref_name_and_path])
builds = project.latest_successful_builds_for(ref_name)
builds.find_by(name: params[:job])
end
end
def ref_name_and_path
@ref_name_and_path ||= extract_ref(params[:ref_name_and_path])
end
def artifacts_file
@artifacts_file ||= build.artifacts_file
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment