From a43335cc31b765f2e5a9fb0d8694fa707a6593c6 Mon Sep 17 00:00:00 2001 From: Yuki Nishijima Date: Sun, 15 Jul 2018 20:45:53 -0400 Subject: [PATCH] Fix builds for kaminari-mongoid fixes builds in https://travis-ci.org/kaminari/kaminari-mongoid/builds/402043846 --- kaminari-core/lib/kaminari/helpers/helper_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kaminari-core/lib/kaminari/helpers/helper_methods.rb b/kaminari-core/lib/kaminari/helpers/helper_methods.rb index 6df54bb2e..295669abf 100644 --- a/kaminari-core/lib/kaminari/helpers/helper_methods.rb +++ b/kaminari-core/lib/kaminari/helpers/helper_methods.rb @@ -204,7 +204,7 @@ def page_entries_info(collection, entry_name: nil) t('helpers.page_entries_info.one_page.display_entries', entry_name: entry_name, count: collection.total_count) else from = collection.offset_value + 1 - to = collection.offset_value + collection.size + to = collection.offset_value + collection.to_a.size t('helpers.page_entries_info.more_pages.display_entries', entry_name: entry_name, first: from, last: to, total: collection.total_count) end.html_safe