Skip to content

Commit

Permalink
release 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Apr 29, 2008
1 parent 2e45f01 commit 87d3d8d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,18 @@
== 2.3.0, released 2008-04-29

* Changed LinkRenderer to receive collection, options and reference to view template NOT in
constructor, but with the #prepare method. This is a step towards supporting passing of
LinkRenderer (or subclass) instances that may be preconfigured in some way
* LinkRenderer now has #page_link and #page_span methods for easier customization of output in
subclasses
* Changed page_entries_info() method to adjust its output according to humanized class name of
collection items. Override this with :entry_name parameter (singular).

page_entries_info(@posts)
#-> "Displaying all 12 posts"
page_entries_info(@posts, :entry_name => 'item')
#-> "Displaying all 12 items"

== 2.2.3, released 2008-04-26 == 2.2.3, released 2008-04-26


* will_paginate gem is no longer published on RubyForge, but on * will_paginate gem is no longer published on RubyForge, but on
Expand Down
2 changes: 1 addition & 1 deletion README.rdoc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ contributions or just simply awesome ideas:
Chris Wanstrath, Dr. Nic Williams, K. Adam Christensen, Mike Garey, Bence Chris Wanstrath, Dr. Nic Williams, K. Adam Christensen, Mike Garey, Bence
Golda, Matt Aimonetti, Charles Brian Quinn, Desi McAdam, James Coglan, Matijs Golda, Matt Aimonetti, Charles Brian Quinn, Desi McAdam, James Coglan, Matijs
van Zuijlen, Maria, Brendan Ribera, Todd Willey, Bryan Helmkamp, Jan Berkel, van Zuijlen, Maria, Brendan Ribera, Todd Willey, Bryan Helmkamp, Jan Berkel,
Lourens Naudé, Rick Olson, Russell Norris. Lourens Naudé, Rick Olson, Russell Norris, Piotr Usewicz, Chris Eppstein.




== Usable pagination in the UI == Usable pagination in the UI
Expand Down
4 changes: 2 additions & 2 deletions lib/will_paginate/version.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,8 @@
module WillPaginate #:nodoc: module WillPaginate #:nodoc:
module VERSION #:nodoc: module VERSION #:nodoc:
MAJOR = 2 MAJOR = 2
MINOR = 2 MINOR = 3
TINY = 3 TINY = 0


STRING = [MAJOR, MINOR, TINY].join('.') STRING = [MAJOR, MINOR, TINY].join('.')
end end
Expand Down
9 changes: 8 additions & 1 deletion lib/will_paginate/view_helpers.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ def paginated_section(*args, &block)
# You can use this as a blueprint for your own, similar helpers. # You can use this as a blueprint for your own, similar helpers.
# #
# <%= page_entries_info @posts %> # <%= page_entries_info @posts %>
# #-> Displaying entries 6 - 10 of 26 in total # #-> Displaying posts 6 - 10 of 26 in total
#
# By default, the message will use the humanized class name of objects
# in collection: for instance, "project types" for ProjectType models.
# Override this to your liking with the <tt>:entry_name</tt> parameter:
#
# <%= page_entries_info @posts, :entry_name => 'item' %>
# #-> Displaying items 6 - 10 of 26 in total
def page_entries_info(collection, options = {}) def page_entries_info(collection, options = {})
entry_name = options[:entry_name] || entry_name = options[:entry_name] ||
(collection.empty?? 'entry' : collection.first.class.name.underscore.sub('_', ' ')) (collection.empty?? 'entry' : collection.first.class.name.underscore.sub('_', ' '))
Expand Down
2 changes: 1 addition & 1 deletion will_paginate.gemspec
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = 'will_paginate' s.name = 'will_paginate'
s.version = '2.2.3' s.version = '2.3.0'
s.date = '2008-04-26' s.date = '2008-04-26'


s.summary = "Most awesome pagination solution for Rails" s.summary = "Most awesome pagination solution for Rails"
Expand Down

0 comments on commit 87d3d8d

Please sign in to comment.