diff --git a/lib/will_paginate/i18n.rb b/lib/will_paginate/i18n.rb index 30f3cba0d..3443caf68 100644 --- a/lib/will_paginate/i18n.rb +++ b/lib/will_paginate/i18n.rb @@ -14,6 +14,7 @@ def will_paginate_translate(keys, options = {}) defaults << Proc.new if block_given? ::I18n.translate(defaults.shift, options.merge(:default => defaults, :scope => :will_paginate)) else + key = Array === keys ? keys.first : keys yield key, options end end diff --git a/lib/will_paginate/view_helpers.rb b/lib/will_paginate/view_helpers.rb index 5f28c9aa0..b814e3691 100644 --- a/lib/will_paginate/view_helpers.rb +++ b/lib/will_paginate/view_helpers.rb @@ -97,7 +97,6 @@ def will_paginate(collection, options = {}) # # The default output contains HTML. Use ":html => false" for plain text. def page_entries_info(collection, options = {}) - html = options[:html] != false model = options[:model] model = collection.first.class unless model or collection.empty? model ||= 'entry' @@ -107,7 +106,7 @@ def page_entries_info(collection, options = {}) model.to_s.underscore end - if html + if options.fetch(:html, true) b, eb = '', '' sp = ' ' html_key = '_html' @@ -137,7 +136,7 @@ def page_entries_info(collection, options = {}) case opts[:count] when 0; "No #{opts[:model]} found" when 1; "Displaying #{b}1#{eb} #{opts[:model]}" - else "Displaying #{b}all #{opts[:count]}#{eb} #{opts[:model]}" + else "Displaying #{b}all#{sp}#{opts[:count]}#{eb} #{opts[:model]}" end end else