问题
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