I've been testing out the behavior of Komodo's Rails Project Template with Rails 2.0, and found that scaffolding breaks with this output:
exists app/models/
exists app/controllers/
exists app/helpers/
exists app/views/movies
exists app/views/layouts/
exists test/functional/
exists test/unit/
wrong number of arguments (1 for 2)
library --skip
exists app/models/
exists app/controllers/
exists app/helpers/
exists app/views/movies
exists app/views/layouts/
exists test/functional/
exists test/unit/
wrong number of arguments (1 for 2)This happens even when I run the command in the command-line, with the usual model and controller name arguments.
It turns out that the version 1.* scaffolding has not only been deprecated, but the meaning of the command has changed with version 2.0. Instead of supplying the name of an existing model, and a new controller, you supply the name of a new model, and its fields, and it will generate a model, migration, and a rest-based controller.
The workaround is simple, and currently requires no change. To build a Rest-based resource for your Rails 2.0 project, click on the "scaffold" tool, give the name of the model as a capitalized, CamelCase singular name ("Movie", "Grocery", "Blog"), and for the "library" field, enter the model attributes instead ("name:string year:integer rating:float" for Movie, "name:string quantity:float price:integer" for Grocery, etc.).
A later version of the tool will check which version of Rails is being run, and adapt accordingly.




