i'm going through chapter 6 of agile web development with rails (pdf) . i'm running the example on page 53, and instead of giving me views in the admin directory, it creates them in the products directory.
thanks for the suggestion, but that syntax gives an error:
C:\temp\ard\depot>ruby script/generate scaffold Admin Product
exists app/controllers/
exists app/helpers/
create app/views/admins
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/admin.rb
create test/unit/admin_test.rb
create test/fixtures/admins.yml
error Before updating scaffolding from new DB schema, try creating a tab
le for your model (Admin)
That single command has written a basic maintenance application. The
Product parameter told the command the name of the model we want, and
the Admin parameter specifies the name of the controller.
Did you already have a controller called admin before running this?
It should work anyway, but are you running the latest rails (1.0)?
By the way, you can get help for those commands by running them without arguments, i.e
script/generate scaffold
gives you the help for the scaffold generator, while
script/generate
shows help for generators in general.
Duarte Carrilho da Graça RailsHelp.com: Searchable Rails reference
CACA: Committee for the Annihilation of Complicated Acronyms
Bookmarks