diff options
Diffstat (limited to 'railties/lib/rails/commands/commands_tasks.rb')
-rw-r--r-- | railties/lib/rails/commands/commands_tasks.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/commands_tasks.rb b/railties/lib/rails/commands/commands_tasks.rb index 11524c4ef5..de60423784 100644 --- a/railties/lib/rails/commands/commands_tasks.rb +++ b/railties/lib/rails/commands/commands_tasks.rb @@ -51,6 +51,10 @@ EOT generate_or_destroy(:generate) end + def destroy + generate_or_destroy(:destroy) + end + def console require_command!("console") options = Rails::Console.parse_arguments(argv) @@ -135,7 +139,7 @@ EOT # This allows us to run `rails server` from other directories, but still get # the main config.ru and properly set the tmp directory. def set_application_directory! - Dir.chdir(File.expand_path('../../', APP_PATH)) unless File.exists?(File.expand_path("config.ru")) + Dir.chdir(File.expand_path('../../', APP_PATH)) unless File.exist?(File.expand_path("config.ru")) end def require_application_and_environment! |