First, get on Edge Rails. Easiest way:
rake rails:freeze:edge
rake rails:update
Then generate some new-school scaffolding:
script/generate scaffold_resource ModelName
This generates a migration template for you. Use that to fill in the details then run rake db:migrate.
In app/views/ModelName, you’ll have to add the details of your model to the different forms. Something like this:
<div><label>Name: <%= f.text_field :name %></label></div>
<div><label>Description: <%= f.text_area :description %></label></div>
I still haven’t figured out how to get things to actually work.
Update 21.10.2006: My problem in getting things to work was a matter of putting my RESTful routes information at the top of the config/routes.db file. Top == higher priority.
Sources
- PeepCode tutorial. It is so nice to be able to watch someone go through all this from start to finish.
- I got most of this information here
- DHH Keynote (slides)
- DHH Keynote (video)
- Details about
form_for(this took me forever to figure out)