Re-Generating Scaffold
-
11-07-2019 - |
Question
Is there any way to re-generate views from newly updated model?
Solution
Unless you've made a lot of changes to the scaffold, it's probably easier just to overwrite the current scaffold:
./script/generate -f scaffold Model
OTHER TIPS
I had the same need, I just backed up some changes and did a destroy/generate, Take care, destroy deletes Everything related to the Model :
rails destroy scaffold Model -f
before I generate again.
rails generate scaffold Model
The scaffold is not intended to create the interface, only to make a starting point for further development. I'm not sure it's even possible (without a lot of unnecessary work) to redo a scaffold, it's much quicker to manually edit the view and controller anyway.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow