Open sarah-mica opened 3 years ago
In ActiveModelSerializer you can specify a custom root name for an array like so:
render json :@items, root: 'custom item list'
With the following result:
{ "custom item list": [ { "item_id": 1, "item name": "item 1" }, { "item_id": 2, "item_name": "item 2" } ] }
Is there any way do this in panko??
Hi @sarah-mica ,
Specifying root name is not supported in Panko as of today.
I'll try to give it a check next weekend.
In ActiveModelSerializer you can specify a custom root name for an array like so:
With the following result:
Is there any way do this in panko??