lib/dato/paginator.rb in dato-0.8.0 vs lib/dato/paginator.rb in dato-0.8.1
- old
+ new
@@ -10,23 +10,23 @@
def response
items_per_page = 100
base_response = @client.get(
- @base_endpoint, @filters.dup.merge('page[limit]' => items_per_page)
+ @base_endpoint, @filters.dup.merge("page[limit]" => items_per_page)
)
extra_pages = (
base_response[:meta][:total_count] / items_per_page.to_f
).ceil - 1
extra_pages.times do |page|
base_response[:data] += @client.get(
@base_endpoint,
@filters.dup.merge(
- 'page[offset]' => items_per_page * (page + 1),
- 'page[limit]' => items_per_page
- )
+ "page[offset]" => items_per_page * (page + 1),
+ "page[limit]" => items_per_page,
+ ),
)[:data]
end
base_response
end