Module: ActiveAdmin::ResourceController::Streaming

Included in:
ActiveAdmin::ResourceController
Defined in:
lib/active_admin/resource_controller/streaming.rb

Overview

This module overrides CSV responses to allow large data downloads. Could be expanded to JSON and XML in the future.

Instance Method Summary collapse

Instance Method Details

#indexObject



12
13
14
15
16
17
# File 'lib/active_admin/resource_controller/streaming.rb', line 12

def index
  super do |format|
    format.csv { stream_csv }
    yield(format) if block_given?
  end
end