<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -96,11 +96,23 @@ module WillPaginate
       # render HTML for pagination
       renderer.to_html
     end
+
+    # Renders a helpful message with numbers of displayed vs. total entries.
+    # You can use this as a blueprint for your own, similar helpers.
+    #
+    #   &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
+      ]
+    end
   end
 
   # This class does the heavy lifting of actually building the pagination
-  # links. It is used by +will_paginate+ helper internally, but avoid using it
-  # directly (for now) because its API is not set in stone yet.
+  # links. It is used by +will_paginate+ helper internally.
   class LinkRenderer
 
     def initialize(collection, options, template)</diff>
      <filename>lib/will_paginate/view_helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -240,3 +240,18 @@ protected
     end
   end
 end
+
+class ViewHelpersTest &lt; Test::Unit::TestCase
+  include WillPaginate::ViewHelpers
+
+  def test_page_entries_info
+    arr = ('a'..'z').to_a
+    collection = arr.paginate :page =&gt; 2, :per_page =&gt; 5
+    assert_equal %{Displaying entries &lt;b&gt;6&amp;nbsp;-&amp;nbsp;10&lt;/b&gt; of &lt;b&gt;26&lt;/b&gt; in total},
+      page_entries_info(collection)
+    
+    collection = arr.paginate :page =&gt; 7, :per_page =&gt; 4
+    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},
+      page_entries_info(collection)
+  end
+end</diff>
      <filename>test/pagination_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6b77787c18d6e7947adbe2e55491459d64bc0564</id>
    </parent>
  </parents>
  <author>
    <name>mislav</name>
    <email>mislav@1eaa51fe-a21a-0410-9c2e-ae7a00a434c4</email>
  </author>
  <url>http://github.com/agile/will_paginate/commit/21472a829687a1571eb236cae48d2c2d6b914cfb</url>
  <id>21472a829687a1571eb236cae48d2c2d6b914cfb</id>
  <committed-date>2008-02-28T07:45:36-08:00</committed-date>
  <authored-date>2008-02-28T07:45:36-08:00</authored-date>
  <message>Add page_entries_info view helper


git-svn-id: svn://errtheblog.com/svn/plugins/will_paginate@454 1eaa51fe-a21a-0410-9c2e-ae7a00a434c4</message>
  <tree>d1a9413fbd7e60c656f1c0672fbf1bef58ae6885</tree>
  <committer>
    <name>mislav</name>
    <email>mislav@1eaa51fe-a21a-0410-9c2e-ae7a00a434c4</email>
  </committer>
</commit>
