summaryrefslogtreecommitdiff
path: root/app/controllers/projects/artifacts_controller.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-12 23:15:08 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-12 23:15:08 +0800
commite383254070baf8a4701e3a10b7cc699f03cefff4 (patch)
tree5537a7c8f87f9f8277ad150ebc04814fc85b5e57 /app/controllers/projects/artifacts_controller.rb
parenta96e9aa0d3f703e61a415d2b0532f3a96d90ba51 (diff)
downloadgitlab-ce-e383254070baf8a4701e3a10b7cc699f03cefff4.tar.gz
Add all the tests and fix stuffs along the way:
It turns out they are different: builds.success.latest.first and builds.latest.success.first If we put success first, that latest would also filter via success, and which is what we want here.
Diffstat (limited to 'app/controllers/projects/artifacts_controller.rb')
-rw-r--r--app/controllers/projects/artifacts_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 7d6ba80b965..25a1c2ca7e1 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -63,7 +63,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
if params[:ref]
builds = project.builds_for(params[:build_name], params[:ref])
- builds.latest.success.first
+ builds.success.latest.first
end
end