rails2.0 scaffold generator

In version rails1.2, we can use script/generate scaffold modelname controllername, but in version 2, the scafflod generator only receive the model parameter in this way: script/generate scaffold modelname. Now, i want to use scaffold generator generate an controller different the model name, how should i do?

To get the help on a generator, don't give it any arguments:

script/generate scaffold

In any case, this scaffold is basically the scaffold_resource of 1.2 days. This builds a model, a RESTful controller, the migration, and a set of RESTful routes (map.resources).

Does it help to just generate the controller?

script/generate controller

You can always change the name(s) to be what you want. You can also just skip the generator and start from scratch.

-Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com