Open
Description
In def page
:total => count(query)
total will not reflect an accurate count of the query if query contains :limit.
For instance, if @posts(:body.ne=>nil) returns 1,333 records and we insert a limit @posts(:body.ne=>nil, :limit=>1000), :total will be 1333, not 1000. This inaccuracy creates extra page links, including last that refer to non-existent pages and records.
I'll file a issue with datamapper on count, but dm-pager should return an accurate set of links regardless.