summaryrefslogtreecommitdiff
path: root/lib/api/projects_relation_builder.rb
diff options
context:
space:
mode:
authorFrancisco Lopez <fjlopez@gitlab.com>2017-11-30 12:52:38 +0100
committerFrancisco Lopez <fjlopez@gitlab.com>2017-12-01 18:32:12 +0100
commit194f7bca9a286942bcd764c836180964e33a1e92 (patch)
treedd1612a1188dcc0fc9436d2c19de8227b661cc07 /lib/api/projects_relation_builder.rb
parent58c5b463ff75618a557d067c16f49ef581cda85c (diff)
downloadgitlab-ce-194f7bca9a286942bcd764c836180964e33a1e92.tar.gz
Comments from code review applied. Also switched forked_from_project and ForkedProjectLinks to ForkNetworkMember
Diffstat (limited to 'lib/api/projects_relation_builder.rb')
-rw-r--r--lib/api/projects_relation_builder.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/projects_relation_builder.rb b/lib/api/projects_relation_builder.rb
index 57df6157225..2e042d51c05 100644
--- a/lib/api/projects_relation_builder.rb
+++ b/lib/api/projects_relation_builder.rb
@@ -3,13 +3,13 @@ module API
extend ActiveSupport::Concern
module ClassMethods
- def prepare_relation(relation)
- relation = preload_relation(relation)
- execute_batch_counting(relation)
- relation
+ def prepare_relation(projects_relation, options = {})
+ projects_relation = preload_relation(projects_relation, options)
+ execute_batch_counting(projects_relation)
+ projects_relation
end
- def preload_relation(relation)
+ def preload_relation(projects_relation, options = {})
raise NotImplementedError, 'self.preload_relation method must be defined and return a relation'
end