Skip to content
This repository
Browse code

When skipping skip active record, mark config.generators.orm to false…

…; LH 5796 remainder
  • Loading branch information...
commit 75e1e2175d81b7047145768e72a0541b3266abed 1 parent be9857c
Aditya Sanghi asanghi authored
2  railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -63,6 +63,8 @@ class Application < Rails::Application
63 63 <% unless options[:skip_active_record] -%>
64 64 # Enable IdentityMap for Active Record, to disable set to false or remove the line below.
65 65 config.active_record.identity_map = true
  66 +<% else -%>
  67 + config.generators.orm = false
66 68 <% end -%>
67 69
68 70 # Enable the asset pipeline
5 railties/test/generators/app_generator_test.rb
@@ -161,7 +161,10 @@ def test_generator_if_skip_active_record_is_given
161 161
162 162 def test_active_record_is_removed_from_frameworks_if_skip_active_record_is_given
163 163 run_generator [destination_root, "--skip-active-record"]
164   - assert_file "config/application.rb", /#\s+require\s+["']active_record\/railtie["']/
  164 + assert_file "config/application.rb" do |file|
  165 + assert_match /#\s+require\s+["']active_record\/railtie["']/, file
  166 + assert_match /config.generators.orm = false/, file
  167 + end
165 168 end
166 169
167 170 def test_creation_of_a_test_directory

0 comments on commit 75e1e21

Please sign in to comment.
Something went wrong with that request. Please try again.