Closed ianbradbury-bizzibody closed 4 years ago
The query returned from the database includes a column that contains HTML witch is then escaped by the Datatables code. Is it possible to present the value as HTML?
I have tried:
data method - appending .html_safe to the records mapping.
{ members: record.members.html_safe, DT_RowId: record.id }
I've also tried using raw()
Any tips/ideas?
Not to worry - I found the answer.
members: record.members.to_s.html_safe,
The trick was to ensure the value was a string and then use html_safe.
The query returned from the database includes a column that contains HTML witch is then escaped by the Datatables code. Is it possible to present the value as HTML?
I have tried:
data method - appending .html_safe to the records mapping.
I've also tried using raw()
Any tips/ideas?