1 require File
.dirname(__FILE__
) + '/../scripts'
3 module Rails
::Generator::Scripts
5 mandatory_options
:command => :destroy
9 usage
= "\nInstalled Generators\n"
10 Rails
::Generator::Base.sources
.each
do |source
|
11 label
= source
.label
.to_s
.capitalize
13 usage
<< " #{label}: #{names.join(', ')}\n" unless names
.empty
?
18 script/generate command. For instance, 'script/destroy migration CreatePost'
19 will delete the appropriate XXX_create_post.rb migration file in db/migrate,
20 while 'script/destroy scaffold Post' will delete the posts controller and
21 views, post model and migration, all associated tests, and the map.resources
22 :posts line in config/routes.rb.
24 For instructions on finding new generators, run script/generate.