Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Azzopardi <steveazz@outlook.com>2019-01-09 18:33:22 +0300
committerSteve Azzopardi <steveazz@outlook.com>2019-01-09 18:33:22 +0300
commitab6b9a1c4350bbaf8b907efb28fbe456e4fe09d5 (patch)
tree66f4b8c7de27c52e45d034def874dee15256a36a /app/controllers/projects/build_artifacts_controller.rb
parentb07ac850efbe5df536d413bbd6c42191910242df (diff)
Remove get_build method for find_by_id
The original intention of `get_build` was as a workaround not to violate `CodeReuse/ActiveRecord`. `find_by_id` does the exact same thing but does not violate the rubocop rule.
Diffstat (limited to 'app/controllers/projects/build_artifacts_controller.rb')
-rw-r--r--app/controllers/projects/build_artifacts_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/build_artifacts_controller.rb b/app/controllers/projects/build_artifacts_controller.rb
index d3d5ba5c75d..4274c356227 100644
--- a/app/controllers/projects/build_artifacts_controller.rb
+++ b/app/controllers/projects/build_artifacts_controller.rb
@@ -45,7 +45,7 @@ class Projects::BuildArtifactsController < Projects::ApplicationController
end
def job_from_id
- project.get_build(params[:build_id]) if params[:build_id]
+ project.builds.find_by_id(params[:build_id]) if params[:build_id]
end
def job_from_ref