diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index cd9516033e..738f7f5301 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -41,7 +41,8 @@ namespace :rails do require 'rails/generators/rails/app/app_generator' gen = Rails::Generators::AppGenerator.new ["rails"], { :with_dispatchers => true }, :destination_root => Rails.root - gen.send(:valid_app_const?) + File.exists?(Rails.root.join("config", "application.rb")) ? + gen.send(:app_const) : gen.send(:valid_app_const?) gen end end |