lib/grape/kaminari.rb in grape-kaminari-0.1.8 vs lib/grape/kaminari.rb in grape-kaminari-0.1.9
- old
+ new
@@ -9,10 +9,10 @@
base.class_eval do
helpers do
def paginate(collection)
collection.page(params[:page]).per(params[:per_page]).padding(params[:offset]).tap do |data|
header "X-Total", data.total_count.to_s
- header "X-Total-Pages", data.num_pages.to_s
+ header "X-Total-Pages", data.total_pages.to_s
header "X-Per-Page", data.limit_value.to_s
header "X-Page", data.current_page.to_s
header "X-Next-Page", data.next_page.to_s
header "X-Prev-Page", data.prev_page.to_s
header "X-Offset", params[:offset].to_s