Commit b2fbeb37 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Remove changes in 'paginate' helper

parent 8d455503
...@@ -97,10 +97,8 @@ module API ...@@ -97,10 +97,8 @@ module API
end end
def paginate(relation) def paginate(relation)
page = (params[:page] || 1).to_i per_page = params[:per_page].to_i
per_page = (params[:per_page] || 30).to_i paginated = relation.page(params[:page]).per(per_page)
paginated = relation.page(page).per(per_page)
add_pagination_headers(paginated, per_page) add_pagination_headers(paginated, per_page)
paginated paginated
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment