In past versions, datatables serialized into JSON that could represent columns containing arbitrarily structured data. For example, a column of post tags could contain an array—
def data
records.map do |record|
{
title: record.title, # String
tags: record.tags, # Array[String]
}
end
end
In past versions, datatables serialized into JSON that could represent columns containing arbitrarily structured data. For example, a column of post tags could contain an array—
—and would be serialized as such:
This allowed the view to handle rendering:
Since #199, returned records no longer contain data but fully rendered HTML views:
This leaves a couple options for how to handle columns that contain structured data:
data
methodNeither is very appealing to me. Is it intended that structured column types just not be used, or is there a better way to address this?