8000 :total records count broken for queries with limits · Issue #26 · tj/dm-pagination · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
:total records count broken for queries with limits #26
Open
@Minger

Description

@Minger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0