Permalink
Browse files

use `total_entries` in page_entries_info() consistently

Fixes #278, fixes #284, fixes #207
  • Loading branch information...
mislav committed Jan 10, 2013
1 parent fbf802a commit 8738d80c20f0fa4639d693c7986027f33ab5e5f7
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/will_paginate/view_helpers.rb
@@ -137,7 +137,7 @@ def page_entries_info(collection, options = {})
i18n_key = :"page_entries_info.single_page#{html_key}"
keys = [:"#{model_key}.#{i18n_key}", i18n_key]
- will_paginate_translate keys, :count => collection.size, :model => model_name do |_, opts|
+ will_paginate_translate keys, :count => collection.total_entries, :model => model_name do |_, opts|
case opts[:count]
when 0; "No #{opts[:model]} found"
when 1; "Displaying #{b}1#{eb} #{opts[:model]}"

0 comments on commit 8738d80

Please sign in to comment.