diff options
author | Steve Azzopardi <steveazz@outlook.com> | 2019-01-09 18:33:22 +0300 |
---|---|---|
committer | Steve Azzopardi <steveazz@outlook.com> | 2019-01-09 18:33:22 +0300 |
commit | ab6b9a1c4350bbaf8b907efb28fbe456e4fe09d5 (patch) | |
tree | 66f4b8c7de27c52e45d034def874dee15256a36a /app/controllers/projects/artifacts_controller.rb | |
parent | b07ac850efbe5df536d413bbd6c42191910242df (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/artifacts_controller.rb')
-rw-r--r-- | app/controllers/projects/artifacts_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb index 9a0997e92ee..2ef18d900f2 100644 --- a/app/controllers/projects/artifacts_controller.rb +++ b/app/controllers/projects/artifacts_controller.rb @@ -86,7 +86,7 @@ class Projects::ArtifactsController < Projects::ApplicationController end def build_from_id - project.get_build(params[:job_id]) if params[:job_id] + project.builds.find_by_id(params[:job_id]) if params[:job_id] end def build_from_ref |