Created
May 19, 2019 20:16
-
-
Save yoones/da4d906fd4ff86f4fd337c137bd7acb5 to your computer and use it in GitHub Desktop.
rails/commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "rails/command" | |
aliases = { | |
"g" => "generate", | |
"d" => "destroy", | |
"c" => "console", | |
"s" => "server", | |
"db" => "dbconsole", | |
"r" => "runner", | |
"t" => "test" | |
} | |
command = ARGV.shift | |
command = aliases[command] || command | |
Rails::Command.invoke command, ARGV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment