Skip to content

Commit

Permalink
Merge pull request #36 from claudioStahl/issue-35
Browse files Browse the repository at this point in the history
Fix #35
  • Loading branch information
jandudulski committed Sep 9, 2016
2 parents 0407090 + 869506c commit e178e91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/grape/kaminari.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def self.included(base)
base.class_eval do
helpers do
def paginate(collection)
collection.page(params[:page]).per(params[:per_page]).padding(params[:offset]).tap do |data|
collection.page(params[:page].to_i).per(params[:per_page].to_i).padding(params[:offset].to_i).tap do |data|
header "X-Total", data.total_count.to_s
header "X-Total-Pages", data.total_pages.to_s
header "X-Per-Page", data.limit_value.to_s
Expand Down

0 comments on commit e178e91

Please sign in to comment.