Rails 基于模型生成表单 [英] Rails generate forms based on model
本文介绍了Rails 基于模型生成表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行初始脚手架命令时,它会根据您的模型自动为您生成一个表单.当您生成迁移时,有什么方法可以重新运行它吗?
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?
能够输入 rails g view user 或 w/e 会根据您的新模型字段更新您的视图,这真是太棒了.
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.
推荐答案
https://github.com/justinfrench/形式主义
允许您这样做.
这篇关于Rails 基于模型生成表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文