开发者

Modify Rails scaffolding so that the create and update actions can receive a JSON string

开发者 https://www.devze.com 2023-01-28 23:00 出处:网络
What is the best way to modify the basic Rails scaffolding so that it can accept a JSON string passed to the create, update, and destroy actions? I would like to keep the开发者_开发问答 scaffolding wo

What is the best way to modify the basic Rails scaffolding so that it can accept a JSON string passed to the create, update, and destroy actions? I would like to keep the开发者_开发问答 scaffolding working as it does by default as well.


I advise you to see the code of Ryan Bates nifty_scaffold generator.

He changed the scaffold to add more options and clean the create, update, and edit functions.

You can learn a lot from that.

0

精彩评论

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