You are currently viewing the BOOK: Beginning Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Sorry, I don't quite understand what you're saying we should change the line to. What are the field:type entries used for?
I'm stuck at the same place that davidtspf is, getting the same error. What should I use for the scaffold line to generate an Item model and a Manage controller?
Go down a bit, to where there is a section header called "Old vs. New". The author there deals with the differences with how such a line should be set up.
It's much like what bimawen said. In order for the scaffold to have the title Manage, something like title:Manage must be used.
So I tried "ruby scrip/generate scaffold Item title:Manage", and it looks to be working so far. See if that will help
Well, finally made it work by getting an older version of rails. Actually an older version of InstantRails is what I'm using, but at least the book example has worked up to where the /manage page has come up.
Here's an update. I am using Rails 2.02, with Linux, which has enough changes to make it significantly different than the book.
As mentioned previously,
I used the following to create the controller and the model:
$ ruby script/generate scaffold Item
which Rails accepted.
I was blocked and made changes to database.yml for mysql, since is defaulted to sqlite3. I then added the partial statement recommended in the book to /view/items/new.html.erb and created the _form.rhtml in views/items.
Next I made the changes suggested for list.rhtml to index.html.erb and now I can add/delete/list store items. I can see these changes in mysql.