8

Is there any way to re-generate views from newly updated model?

totocaster
  • 6,243
  • 5
  • 37
  • 46

3 Answers3

14

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
Benny Wong
  • 6,773
  • 5
  • 31
  • 25
3

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

jbheren
  • 516
  • 3
  • 11
1

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.

Stein G. Strindhaug
  • 5,077
  • 2
  • 28
  • 41