diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-15 13:28:21 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 23:49:41 +0300 |
commit | 9781ac552d4ae41983b2d95768e0fb06817e0ef9 (patch) | |
tree | 8beef5af5c8ac701ce53fcf47591d0ea1f6aff32 /app/serializers/concerns | |
parent | 20a08965bc949ea233cdde4e777698222fcabff2 (diff) |
Include pagination when rendering expanded hierarchies
Diffstat (limited to 'app/serializers/concerns')
-rw-r--r-- | app/serializers/concerns/with_pagination.rb | 6 |
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. |