summaryrefslogtreecommitdiff
path: root/app/serializers/concerns
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-15 12:28:21 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 22:49:41 +0200
commit9781ac552d4ae41983b2d95768e0fb06817e0ef9 (patch)
tree8beef5af5c8ac701ce53fcf47591d0ea1f6aff32 /app/serializers/concerns
parent20a08965bc949ea233cdde4e777698222fcabff2 (diff)
downloadgitlab-ce-9781ac552d4ae41983b2d95768e0fb06817e0ef9.tar.gz
Include pagination when rendering expanded hierarchies
Diffstat (limited to 'app/serializers/concerns')
-rw-r--r--app/serializers/concerns/with_pagination.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/serializers/concerns/with_pagination.rb b/app/serializers/concerns/with_pagination.rb
index 484c6855f7c..d29e22d6740 100644
--- a/app/serializers/concerns/with_pagination.rb
+++ b/app/serializers/concerns/with_pagination.rb
@@ -1,10 +1,12 @@
module WithPagination
+ attr_accessor :paginator
+
def with_pagination(request, response)
- tap { @paginator = Gitlab::Serializer::Pagination.new(request, response) }
+ tap { self.paginator = Gitlab::Serializer::Pagination.new(request, response) }
end
def paginated?
- @paginator.present?
+ paginator.present?
end
# super is `BaseSerializer#represent` here.