rajatthareja/ReportBuilder

ReportBuilder.additional_js not being added to HTML report

Opened this issue · 0 comments

I tried adding some additional javascript as both a string and file path, and it wasn't showing up at the footer of the HTML as expected. Looking at the ReportBuilder.additional_js= def, it looks like the @options key may be incorrect. Shouldn't @options[:additional_js=] be @options[:additional_js]? Making that change locally resulted in the additional javascript being included in the report.

Edit to add:
Workaround is to just access the options directly before building the report. Change "ReportBuilder.additional_js" to "ReportBuilder.options[:additional_js]"

@options[:additional_js=] = additional_js if additional_js.is_a? String