Active administrator in rails - csv limit

I downloaded csv models using the active admin 0.3.4, which had about 12,000 entries. But csv was limited to only 10,000 rows of data. Is there a way to not limit the number of lines in a csv download?

+4
source share
2 answers

In lib / active_admin / resource_controller / collection.rb, the max_csv_records function of the github source code appeared. Change the default constant as you need

+1
source

hardcoded

I put this in my config / intializers / active_admin.rb

# Monkey patch to increase the number of records # exported in csv download -default is 10k module ActiveAdmin class ResourceController module DataAccess # in active admin 0.6 def max_csv_records 30_000 end # needed for current active admin master def max_per_page 30_000 end end end end 
+1
source

Source: https://habr.com/ru/post/1397349/


All Articles