Kaminari v0.13.0 Release Notes
-
๐ Rails 3.2 ready! #180 [@slbug]
๐ DataMapper support! #149 [@NoICE, @Ragmaanir]
๐ Sinatra & Padrino support! #179 [@udzura, @mlightner, @aereal]
โ Added mongoid embedded documents support! #155 [@yuki24]
Added
each_relevant_page
that only visits pages in the inner or outer windows. Performance improved, particularly with very large number of pages. #154 [@cbeer]๐ Memoize count for AR when calling
total_count
. Increases performance for large datasets. #138 [@sarmiena]Added
page_entries_info
view helper #140 [@jeffreyiacono]<%= page_entries_info @posts %> #=> Displaying posts 6 - 10 of 26 in total
Added
link_to_next_page
helper method that simply links to the next page<%= link_to_next_page @posts, 'More' %> #=> <a href="/posts?page=7" rel="next">More</a>
Let one override the
rel
attribute forlink_to_next_page
helper #177 [@webmat]โ Added
total_count
param for PaginatableArray. Useful for when working with RSolr #141 [@samdalton]๐ Changed
Kaminari.paginate_array
API to take a Hashoptions
And specifying :limit & :offset immediately builds a pagination ready object# the following two are equivalent. Use whichever you like Kaminari.paginate_array((1..100).to_a, limit: 10, offset: 10) Kaminari.paginate_array((1..100).to_a).page(2).per(10)
โ Added
padding
method to skip an arbitrary record count #60 [@aaronjensen]User.page(2).per(10).padding(3) # this will return users 14..23
๐ง Made the pagination method name (defaulted to
page
) configurable #57, #162# you can use the config file and its generator for this Kaminari.config.page_method_name = :paging Article.paging(3).per(30)
๐ Only add extensions to direct descendents of ActiveRecord::Base #108 [@seejohnrun]
AR models that were subclassed before Kaminari::ActiveRecordExtension is included pick up the extensions #119 [@pivotal-casebook]
Avoid overwriting AR::Base inherited method #165 [@briandmcnabb]
๐ Stopped depending on Rails gem #159 [@alsemyonov]
๐ท introduced Travis CI #181 [@hsbt]