• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

activeadmin / activeadmin / 4616
82%
master: 79%

Build:
Build:
LAST BUILD BRANCH: backport_phantomjs_removal
DEFAULT BRANCH: master
Ran 22 Nov 2015 11:00PM UTC
Jobs 4
Files 142
Run time 16min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4616

push

travis-ci

seanlinsley
allow CSV pagination to be customizable

This fixes the performance issues that #3375 introduced by switching
from `find_each` to Kaminari, since Kaminari has to do a SQL count. For
those that want that behavior they can enable it by setting
`paginate_with: :kaminari`, but the fastest option should be the
default for Active Admin.

I chose this approach instead of #4082 because databases don’t
guarantee any particular order when requesting records, so it’s
possible that the resulting CSV won’t include all records.

In this commit I removed the `batch_size` method. Ideally it should be
a config option, but I didn’t have the time / motivation to write tests
for it. Currently both pagination methods use a 1000 record page size.

This commit refactors the tests that were creating their own
controllers, to reduce duplication.

While writing this I came across a bug with the byte order mark / BOM
character. Our Cucumber tests had set it to an empty string, which
would cause the unit tests to fail. Turns out we weren’t encoding that
character. I updated the code to fix that, but I didn’t think it was
important enough to write a separate test for.

3146 of 3855 relevant lines covered (81.61%)

36.07 hits per line

Jobs
ID Job ID Ran Files Coverage
4 4616.4 (2.2.3, RAILS=4.1.13) 22 Nov 2015 11:00PM UTC 0
81.67
Travis Job 4616.4
6 4616.6 (2.2.3, RAILS=4.2.4) 22 Nov 2015 11:05PM UTC 0
81.67
Travis Job 4616.6
7 4616.7 (jruby-9.0.0.0, RAILS=4.1.13) 22 Nov 2015 11:14PM UTC 0
81.45
Travis Job 4616.7
9 4616.9 (jruby-9.0.0.0, RAILS=4.2.4) 22 Nov 2015 11:16PM UTC 0
81.45
Travis Job 4616.9
Source Files on build 4616
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4616
  • 70ed3904 on github
  • Next Build on csv-pagination (#4620)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc