If I ran scaffold and it created the new/update routes and html forms, and then later I added a few columns to th开发者_开发技巧e database via a migration, is it possible to update the html form that was generated?
Yes u can..and you should do it to update your views.And it will ask some overwrite prompts
Yes you can. You can simply run rails generate scaffold <model> <fields>
and add --skip
or --force
on the end. This will do exactly what it sounds like it will do. It will either override files that all ready exist or skip the files that all ready exist.
精彩评论