From 1eebfc9f66149020efe23a620da110424e5a5c33 Mon Sep 17 00:00:00 2001 From: Akira Matsuda & Yukiko Kawamoto Date: Fri, 13 Sep 2013 18:16:02 +0900 Subject: Missing destroy command --- railties/lib/rails/commands/commands_tasks.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib/rails/commands/commands_tasks.rb') diff --git a/railties/lib/rails/commands/commands_tasks.rb b/railties/lib/rails/commands/commands_tasks.rb index 11524c4ef5..59d2a0793e 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) -- cgit v1.2.3 From c10a78124c1c32f8ce3a92888863b9b258efcc06 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 1 Nov 2013 10:39:06 +0100 Subject: More Warnings removed for ruby trunk Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb --- railties/lib/rails/commands/commands_tasks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/commands/commands_tasks.rb') diff --git a/railties/lib/rails/commands/commands_tasks.rb b/railties/lib/rails/commands/commands_tasks.rb index 59d2a0793e..de60423784 100644 --- a/railties/lib/rails/commands/commands_tasks.rb +++ b/railties/lib/rails/commands/commands_tasks.rb @@ -139,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! -- cgit v1.2.3