diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-05-28 22:04:13 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-09-25 21:31:35 +0200 |
commit | 6813edc7d926965e5644cd8befaf229a35b9d8ca (patch) | |
tree | 05732c004c68475cb6bd5794d87e030096d4d75c /railties/lib/rails/commands/help | |
parent | b724dbbb8b337d84a3ca8380c9dd75d79a44badf (diff) | |
download | rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.gz rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.tar.bz2 rails-6813edc7d926965e5644cd8befaf229a35b9d8ca.zip |
Initial command structure.
Diffstat (limited to 'railties/lib/rails/commands/help')
-rw-r--r-- | railties/lib/rails/commands/help/USAGE | 16 | ||||
-rw-r--r-- | railties/lib/rails/commands/help/help_command.rb | 13 |
2 files changed, 29 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/help/USAGE b/railties/lib/rails/commands/help/USAGE new file mode 100644 index 0000000000..0f6ff756ce --- /dev/null +++ b/railties/lib/rails/commands/help/USAGE @@ -0,0 +1,16 @@ +Usage: bin/rails COMMAND [args] [options] + +The most common rails commands are: + generate Generate new code (short-cut alias: "g") + console Start the Rails console (short-cut alias: "c") + server Start the Rails server (short-cut alias: "s") + test Run tests (short-cut alias: "t") + dbconsole Start a console for the database specified in config/database.yml + (short-cut alias: "db") + new Create a new Rails application. "rails new my_app" creates a + new application called MyApp in "./my_app" + +All commands can be run with -h (or --help) for more information. + +In addition to those commands, there are: + diff --git a/railties/lib/rails/commands/help/help_command.rb b/railties/lib/rails/commands/help/help_command.rb new file mode 100644 index 0000000000..5bcc4c8eee --- /dev/null +++ b/railties/lib/rails/commands/help/help_command.rb @@ -0,0 +1,13 @@ +module Rails + module Command + class HelpCommand < Base + hide_command! + + def help(*) + puts self.class.desc + + Rails::Command.print_commands + end + end + end +end |