ReportBuilder icon indicating copy to clipboard operation
ReportBuilder copied to clipboard

ReportBuilder.additional_js not being added to HTML report

Open ChrisVereb opened this issue 4 years ago • 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]"

https://github.com/rajatthareja/ReportBuilder/blob/ff96c173ab24d22beba43c920023b792622b20b8/lib/report_builder.rb#L366

ChrisVereb avatar Sep 15 '20 02:09 ChrisVereb