Rails::CommandsTasks
This is a class which takes in a rails command and initiates the appropriate initiation sequence.
Warning: This class mutates ARGV because some commands require manipulating it before they are run.
Included modules
- Rails::RakeProxy
Constants
ADDITIONAL_COMMANDS = [\n[ 'destroy', 'Undo code generated with "generate" (short-cut alias: "d")' ],\n[ 'plugin new', 'Generates skeleton for developing a Rails plugin' ],\n[ 'runner',\n'Run a piece of code in the application environment (short-cut alias: "r")' ]\n]
COMMAND_WHITELIST = %w(plugin generate destroy console server dbconsole runner new version help test)
HELP_MESSAGE = <<-EOT\nUsage: rails COMMAND [ARGS]\n\nThe most common rails commands are:\ngenerate Generate new code (short-cut alias: "g")\nconsole Start the Rails console (short-cut alias: "c")\nserver Start the Rails server (short-cut alias: "s")\ntest Run tests (short-cut alias: "t")\ndbconsole Start a console for the database specified in config/database.yml\n(short-cut alias: "db")\nnew Create a new Rails application. "rails new my_app" creates a\nnew application called MyApp in "./my_app"\n\nAll commands can be run with -h (or --help) for more information.\n\nIn addition to those commands, there are:\nEOT
Attributes
| [R] | argv |
Files
- railties/lib/rails/commands/commands_tasks.rb