<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -132,11 +132,19 @@ module WillPaginate
     #   &lt;%= page_entries_info @posts %&gt;
     #   #-&gt; Displaying entries 6 - 10 of 26 in total
     def page_entries_info(collection)
-      %{Displaying entries &lt;b&gt;%d&amp;nbsp;-&amp;nbsp;%d&lt;/b&gt; of &lt;b&gt;%d&lt;/b&gt; in total} % [
-        collection.offset + 1,
-        collection.offset + collection.length,
-        collection.total_entries
-      ]
+      if collection.total_pages &lt; 2
+        case collection.size
+        when 0; 'No entries found'
+        when 1; 'Displaying &lt;b&gt;1&lt;/b&gt; entry'
+        else;   &quot;Displaying &lt;b&gt;all #{collection.size}&lt;/b&gt; entries&quot;
+        end
+      else
+        %{Displaying entries &lt;b&gt;%d&amp;nbsp;-&amp;nbsp;%d&lt;/b&gt; of &lt;b&gt;%d&lt;/b&gt; in total} % [
+          collection.offset + 1,
+          collection.offset + collection.length,
+          collection.total_entries
+        ]
+      end
     end
 
     def self.total_pages_for_collection(collection) #:nodoc:</diff>
      <filename>lib/will_paginate/view_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -156,6 +156,19 @@ class ViewTest &lt; Test::Unit::TestCase
     assert_equal %{Displaying entries &lt;b&gt;25&amp;nbsp;-&amp;nbsp;26&lt;/b&gt; of &lt;b&gt;26&lt;/b&gt; in total},
       @html_result
   end
+
+  def test_page_entries_info_with_single_page_collection
+    @template = '&lt;%= page_entries_info collection %&gt;'
+    
+    paginate(('a'..'d').to_a.paginate(:page =&gt; 1, :per_page =&gt; 5))
+    assert_equal %{Displaying &lt;b&gt;all 4&lt;/b&gt; entries}, @html_result
+    
+    paginate(['a'].paginate(:page =&gt; 1, :per_page =&gt; 5))
+    assert_equal %{Displaying &lt;b&gt;1&lt;/b&gt; entry}, @html_result
+    
+    paginate([].paginate(:page =&gt; 1, :per_page =&gt; 5))
+    assert_equal %{No entries found}, @html_result
+  end
   
   ## parameter handling in page links ##
   </diff>
      <filename>test/view_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5b0e0b8d7d8c2096c157212447a6f1925f6ae295</id>
    </parent>
  </parents>
  <author>
    <name>Mislav Marohni&#263;</name>
    <email>mislav.marohnic@gmail.com</email>
  </author>
  <url>http://github.com/mislav/will_paginate/commit/cc1516ddd201c5c1c25fd304943ebad529dbfa74</url>
  <id>cc1516ddd201c5c1c25fd304943ebad529dbfa74</id>
  <committed-date>2008-04-21T08:22:04-07:00</committed-date>
  <authored-date>2008-04-21T08:22:04-07:00</authored-date>
  <message>Change output of &quot;page_entries_info&quot; on single-page collection and erraneous output with empty collection as reported by Tim Chater.</message>
  <tree>e20523d583990c76e3f4b2d3d0dceeb20f998764</tree>
  <committer>
    <name>Mislav Marohni&#263;</name>
    <email>mislav.marohnic@gmail.com</email>
  </committer>
</commit>
