mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #2611 from ognevsky/add-destroy-alias
Added destroy alias to rails generator
This commit is contained in:
@@ -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>.
|
||||
|
||||
<shell>
|
||||
$ rails generate model Oops
|
||||
exists app/models/
|
||||
|
||||
@@ -4,6 +4,7 @@ ARGV << '--help' if ARGV.empty?
|
||||
|
||||
aliases = {
|
||||
"g" => "generate",
|
||||
"d" => "destroy",
|
||||
"c" => "console",
|
||||
"s" => "server",
|
||||
"db" => "dbconsole",
|
||||
@@ -87,7 +88,7 @@ The most common rails commands are:
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user