Wrapper for DataMapper::Collection to behave like the Sequel pagination.
needs ‘datamapper’ (or ‘dm-core’ and ‘dm-aggregates’)
Public Class Methods
new(*args)click to toggle source
# File lib/ramaze/helper/paginate.rb, line 290definitialize(*args)
unlessdefined?(DataMapper::Aggregates)
Ramaze::Log.warn"paginate.rb: it is strongly "+"recommended to require 'dm-aggregates'"endsuperend
Public Instance Methods
empty?()click to toggle source
# File lib/ramaze/helper/paginate.rb, line 303defempty?size==0end
size()click to toggle source
# File lib/ramaze/helper/paginate.rb, line 299defsize@cached_size||=@array.countend