diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index 3723addf2b..22d6d09baf 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -63,6 +63,8 @@ module <%= app_const_base %> <% unless options[:skip_active_record] -%> # Enable IdentityMap for Active Record, to disable set to false or remove the line below. config.active_record.identity_map = true +<% else -%> + config.generators.orm = false <% end -%> # Enable the asset pipeline diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index e271095636..64ccaa762f 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -161,7 +161,10 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_active_record_is_removed_from_frameworks_if_skip_active_record_is_given run_generator [destination_root, "--skip-active-record"] - assert_file "config/application.rb", /#\s+require\s+["']active_record\/railtie["']/ + assert_file "config/application.rb" do |file| + assert_match /#\s+require\s+["']active_record\/railtie["']/, file + assert_match /config.generators.orm = false/, file + end end def test_creation_of_a_test_directory |