Wednesday, March 16, 2011

Re-Generating Scaffold

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

From stackoverflow
  • 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.

  • 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
    
    totocaster : What is -f ? Couldn't find '-f' generator
    Mike Breen : -f, or --force, will overwrite files that already exists. You can run script/generate scaffold to see all available options.

0 comments:

Post a Comment