开发者

Save multiple google maps points as nested attributes on Rails

开发者 https://www.devze.com 2023-03-12 04:54 出处:网络
I have created a scaffold named \"Travel\", which have as nested attribute \"Points\". When I go to the \"edit\" page of \"Travel\", I open the js of google maps, and I want t开发者_Python百科o let t

I have created a scaffold named "Travel", which have as nested attribute "Points".

When I go to the "edit" page of "Travel", I open the js of google maps, and I want t开发者_Python百科o let the users to add as many points as they want.

I don't know how to do multiple posts to rails for save an undefined number of points.

Thank you to all.


A really good tutorial on this can be found here: http://railscasts.com/episodes/196-nested-model-form-part-1

It gives good techniques for handling an undetermined number of nested attributes

0

精彩评论

暂无评论...
验证码 换一张
取 消