diff options
Diffstat (limited to 'railties/lib/rails/commands.rb')
-rw-r--r-- | railties/lib/rails/commands.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/rails/commands.rb b/railties/lib/rails/commands.rb new file mode 100644 index 0000000000..f32bf772a5 --- /dev/null +++ b/railties/lib/rails/commands.rb @@ -0,0 +1,17 @@ +ARGV << '--help' if ARGV.empty? + +aliases = { + "g" => "generate", + "d" => "destroy", + "c" => "console", + "s" => "server", + "db" => "dbconsole", + "r" => "runner" +} + +command = ARGV.shift +command = aliases[command] || command + +require 'rails/commands/commands_tasks' + +Rails::CommandsTasks.new(ARGV).run_command!(command) |