DEV Community

Discussion on: Rails Strong Params and Accepting Nested Parameters

Collapse
 
crazyoptimist profile image
crazyoptimist

Hey Christian,
Here is my case:

params.require(:geo_datum)
.permit(:type, properties: [ :name, :amenity, :popupContent ],
geometry: [ :type, coordinates: [ :lat, :lng ] ]) 

I want to just change the last part to coordinates: [[[]]]
It didn't raised any error but still seems not working.
The data structure of the part is:

coordinates: [
[
[lat:Float, lng:Float],[lat:Float, lng:Float],[lat:Float, lng:Float],[lat:Float, lng:Float] ...
]
]

How can I figure this out?