Rails generate forms based on model

若如初见. 提交于 2019-12-23 18:39:24

问题


When running the initial scaffold command, it auto generates a form for you based on your model. Is there any way to rerun this when you are generating a migration?

It would be awesome to be able to type rails g view user or w/e that would update your views according to your new model fields.


回答1:


https://github.com/justinfrench/formtastic

Allows you to do this.



来源:https://stackoverflow.com/questions/10471174/rails-generate-forms-based-on-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!