diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-09-26 20:28:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-26 20:28:40 +0200 |
commit | c994a893c18c0456fd2a30efe4debfc2b18e2508 (patch) | |
tree | 0253b1343a1760dc4701f7d2ee2ff8cdd1d1b290 /railties/lib/rails/commands/new/new_command.rb | |
parent | a6da7938017647dd6e19e23d3d47126cb7a3e1fe (diff) | |
parent | c0c73738bd04c86fbcf6d22c961fec0d33aa2bf6 (diff) | |
download | rails-c994a893c18c0456fd2a30efe4debfc2b18e2508.tar.gz rails-c994a893c18c0456fd2a30efe4debfc2b18e2508.tar.bz2 rails-c994a893c18c0456fd2a30efe4debfc2b18e2508.zip |
Merge pull request #26414 from rails/rails-commands
Initial Rails Commands Infrastructure
Diffstat (limited to 'railties/lib/rails/commands/new/new_command.rb')
-rw-r--r-- | railties/lib/rails/commands/new/new_command.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/new/new_command.rb b/railties/lib/rails/commands/new/new_command.rb new file mode 100644 index 0000000000..13eedfc479 --- /dev/null +++ b/railties/lib/rails/commands/new/new_command.rb @@ -0,0 +1,15 @@ +module Rails + module Command + class NewCommand < Base + def help + Rails::Command.invoke :application, [ "--help" ] + end + + def perform(*) + puts "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.\n" + puts "Type 'rails' for help." + exit 1 + end + end + end +end |