lib/grape/kaminari.rb in grape-kaminari-0.1.2 vs lib/grape/kaminari.rb in grape-kaminari-0.1.3
- old
+ new
@@ -19,11 +19,11 @@
end
end
def self.paginate(options = {})
options.reverse_merge!(
- per_page: 10,
- max_per_page: false
+ per_page: ::Kaminari.config.default_per_page || 10,
+ max_per_page: ::Kaminari.config.max_per_page
)
params do
optional :page, type: Integer, default: 1,
desc: 'Page offset to fetch.'
optional :per_page, type: Integer, default: options[:per_page],