Sha256: 7298072e7d29584c443fa5ae25db647817b393840d6291551b3e0e19d1f92d5d
Contents?: true
Size: 308 Bytes
Versions: 5
Compression:
Stored size: 308 Bytes
Contents
class ActionController::Responder def to_csv name = "#{controller.resource.class.name.downcase}_#{Time.now.to_i}" return controller.send_data controller.send(:end_of_association_chain).pg_copy_to_string, :filename => "/tmp/#{name}.csv", :type => "text/csv", :disposition => 'inline' end end
Version data entries
5 entries across 5 versions & 1 rubygems