Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm trying to create PDF's with Prawn, but I get: Prawn::Errors::UnrecognizedTableContent

I'm following this railscasts #153, and I'm trying to add table data to prawn. I keep getting this error:

Prawn::Errors::UnrecognizedTableContent
like image 687
Aaron Avatar asked Apr 22 '14 13:04

Aaron


1 Answers

Watch out, since prawn will get confused if your table contains any nil or non string values. Try using the .to_s method.

Example

@report.data.to_s
like image 196
Aaron Avatar answered Sep 21 '22 14:09

Aaron