Permalink
Browse files

Added comment

  • Loading branch information...
1 parent a66a1a4 commit ce567948cddc2fb809c0d75de8d3c25c74b04236 Brad Seefeld committed Dec 2, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/will_paginate/view_helpers.rb
@@ -138,6 +138,8 @@ def page_entries_info(collection, options = {})
keys = [:"#{model_key}.#{i18n_key}", i18n_key]
count = collection.size
+
+ # If a group clause was used, count is returned as hash of :group => :count
count = count.length if count.is_a? Hash
will_paginate_translate keys, :count => count, :model => model_name do |_, opts|
case opts[:count]

0 comments on commit ce56794

Please sign in to comment.