Browse files

Add Destroy Alias

* Added destroy alias to rails generator

* add alias info for destroy command

* Updated command line guides
  • Loading branch information...
ognevsky committed Aug 20, 2011
1 parent aae5ebf commit 44f0d94469fb6c5d400776c3307b16fb8e4d1eb1
Showing with 4 additions and 1 deletion.
  1. +2 −0 railties/guides/source/command_line.textile
  2. +2 −1 railties/lib/rails/commands.rb
@@ -325,6 +325,8 @@ h4. +rails destroy+
Think of +destroy+ as the opposite of +generate+. It'll figure out what generate did, and undo it.
You can also use the alias "d" to invoke the destroy command: <tt>rails d</tt>.
$ rails generate model Oops
exists app/models/
@@ -4,6 +4,7 @@
aliases = {
"g" => "generate",
"d" => "destroy",
"c" => "console",
"s" => "server",
"db" => "dbconsole",
@@ -87,7 +88,7 @@
In addition to those, there are:
application Generate the Rails application code
destroy Undo code generated with "generate"
destroy Undo code generated with "generate" (short-cut alias: "d")
benchmarker See how fast a piece of code runs
profiler Get profile information from a piece of code
plugin Install a plugin

0 comments on commit 44f0d94

Please sign in to comment.