Froze rails gems
[depot.git] / vendor / rails / railties / lib / rails_generator / scripts / destroy.rb
1 require File.dirname(__FILE__) + '/../scripts'
2
3 module Rails::Generator::Scripts
4 class Destroy < Base
5 mandatory_options :command => :destroy
6
7 protected
8 def usage_message
9 usage = "\nInstalled Generators\n"
10 Rails::Generator::Base.sources.each do |source|
11 label = source.label.to_s.capitalize
12 names = source.names
13 usage << " #{label}: #{names.join(', ')}\n" unless names.empty?
14 end
15
16 usage << <<end_blurb
17
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.
23
24 For instructions on finding new generators, run script/generate.
25 end_blurb
26 return usage
27 end
28 end
29 end