Skip to content

Commit 2c69c7a

Browse files
committed
Don't pass anything but page/per_page/total_entries
Signed-off-by: David Celis <[email protected]>
1 parent 08de2b3 commit 2c69c7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/api-pagination.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ def paginate_with_will_paginate(collection, options)
6060
if defined?(Sequel::Dataset) && collection.kind_of?(Sequel::Dataset)
6161
collection.paginate(options[:page], options[:per_page])
6262
else
63+
supported_options = [:page, :per_page, :total_entries]
64+
options = options.dup.keep_if { |k,v| supported_options.include?(k.to_sym) }
6365
collection.paginate(options)
6466
end
6567
end

0 commit comments

Comments
 (0)