summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorSteve Azzopardi <steveazz@outlook.com>2019-01-09 16:33:22 +0100
committerSteve Azzopardi <steveazz@outlook.com>2019-01-09 16:33:22 +0100
commitab6b9a1c4350bbaf8b907efb28fbe456e4fe09d5 (patch)
tree66f4b8c7de27c52e45d034def874dee15256a36a /app/models/project.rb
parentb07ac850efbe5df536d413bbd6c42191910242df (diff)
downloadgitlab-ce-ab6b9a1c4350bbaf8b907efb28fbe456e4fe09d5.tar.gz
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/models/project.rb')
-rw-r--r--app/models/project.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index a66ed6736ca..9d28ff81cda 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -658,10 +658,6 @@ class Project < ActiveRecord::Base
latest_successful_build_for(job_name, ref) || raise(ActiveRecord::RecordNotFound.new("Couldn't find job #{job_name}"))
end
- def get_build(id)
- builds.find_by(id: id)
- end
-
def merge_base_commit(first_commit_id, second_commit_id)
sha = repository.merge_base(first_commit_id, second_commit_id)
commit_by(oid: sha) if sha