fesplugas/typus — Issue #355: Export CSV
Author: timbica
Created: 2012-03-02 17:27:47+00:00
State: open

Hello.

In module Typus::Controller::Format we have the generate_csv method used to export to CSV.
I think this export method has the following issues:
1) only exports well in plain English (exporting in languages that have complex characters will not render properly in Excel)
2) we only can export all data, not taking into account the current filters

I've a fix for the first issue - I'll try to submit a Pull request.

Concerning the second issue:
In the generate_csv method we have the following line:
options = { :conditions => @conditions, :batch_size => 1000 }

But I can't see where this @conditions variable is being assigned... I think it won't be ever assigned.
It's supposed to be the filter conditions?
How can we export CSV taking the filters into account?