format_header doesn't seem to work with spreadsheets
Closed this issue · 4 comments
First off, thanks a bunch for dossier, it's working really well for me to get a report framework up and running quickly.
Overriding format_header
doesn't seem to change behavior when downloading the .csv
or .xls
spreadsheets. My format_header has a fail
in it but no exception is thrown. When I've tried without the fail
my implemented behavior isn't followed.
I think the problem is in lib/dossier/stream_csv.rb
and lib/dossier/xls.rb
where Dossier::Formatter.titleize
is called instead of report.format_header
.
Glad you like Dossier! Would you mind trying to create a failing test?
Hey @russellsilva,
Thanks for reporting this. The problem is two fold in that we are calling Dossier::Formatter.titleize
when we generate the csv and xls responses, however, we are doing that because we output the raw results. After some thought I think that we should always use the formatted headers (even if the results are unformatted) and I am working on a fix for this that should be available soon.
this should be fixed in v2.11.0
. Thanks again for using dossier!
Looks fixed to me. Thanks @adamhunter. Like I said dossier is working great for us.