Rolling with Ruby on Rails, Part 2
Subject:   Great Article
Date:   2005-09-08 08:56:56
From:   MikeBlake
Response to: Great Article

I noticed the same thing. IS there any doc on the scaffold generator? I never got it to work properly.
Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Great Article
    2005-09-10 10:14:19  MikeBlake [View]

    Got the scaffold generator working thanks to
    this (

    First, I started from a fresh rails app. The scaffold generator gets confused if you've already generated controllers.

    To avoid purals, specify the name of the controller :

    ruby script/generate scaffold Recipe recipe

    Lastly, use the -f option to force overwriting duplicated pages in additional runs:

    ruby script/generate scaffold Category category -f

    • Great Article
      2006-01-10 15:36:49  RichOnRails [View]

      Code generated by scaffold can be destroyed by generate's sibling "destroy" such as:

      ruby script/destroy scaffold Category category