diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2015-12-28 17:01:02 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2015-12-28 17:01:28 +0100 |
commit | b2fbeb377d8ba17352d40817b0b444196cb97636 (patch) | |
tree | 9daadea69375291ad7f5a8fb9159053b388db100 /lib | |
parent | 8d4555037a844d21dbf56c2995cff30782af920b (diff) | |
download | gitlab-ce-b2fbeb377d8ba17352d40817b0b444196cb97636.tar.gz |
Remove changes in 'paginate' helper
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 8fb5cd6ab63..a4df810e755 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -97,10 +97,8 @@ module API end def paginate(relation) - page = (params[:page] || 1).to_i - per_page = (params[:per_page] || 30).to_i - - paginated = relation.page(page).per(per_page) + per_page = params[:per_page].to_i + paginated = relation.page(params[:page]).per(per_page) add_pagination_headers(paginated, per_page) paginated |