Well yes, I can /see/ that it was removed from trunk in revision 6632 <http://dev.rubyonrails.org/changeset/6632/trunk/railties/lib/rails_generator/generators/components/scaffold_resource>, but /why/? And what are we supposed to use in its place?
I searched around and couldn't find any discussion about scaffold_resource being removed, except for this cryptic comment by David:
You're dead! We killed you!
So I'm guessing we're all supposed to start using the plain old scaffold generator instead?
There are quite a few articles <http://earthcode.com/blog/2007/01/nested_crud_resources_in_rails.html> and at least one book <O'Reilly Media - Technology and Business Training; that tell people to use script/generate scaffold_resource... For example:
Rails provides two similar resource generators. The first, >scaffold_resource|, generates full scaffolding of model, view, helper, tests, and controllers for a resource. As arguments, it takes the model name (in singular form) and an optional list of property names and data types for the model. The |scaffold_resource| generator is run using
ruby script/generate scaffold_resource task name:string description:text due_date:date The second generator, |resource|, provides the same functionality as >scaffold_resource|, but does not create any views. Its syntax is identical to the |scaffold_resource| syntax. The |resource| generator is useful when views written by |scaffold_resource| will be overwritten immediately with custom views.
Both generators create controller code [wrong!] that is similar to the code shown earlier in the |TasksController|. In addition, the generators create a model with an appropriate migration to create the fields specified in the command line. These two tools are useful for cranking out many skeleton resources at the beginning of a project.
I for one (probably because I'm a newbie to this REST stuff) think it's handy to be able to generate a fully functional scaffold for my restful resource and am disappointed that it was removed.
Anyway, for anyone else in the same boat as me, there is at least one way to keep using scaffold_resource:
svn export -r 6631 \ http://dev.rubyonrails.org/svn/rails/trunk/railties/lib/rails_generator/generators/components/scaffold_resource/@6631 \ vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/
Hope that helps someone. Thanks for your time!