Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Commit 8c99f33

Browse files
committed
Add handlers that comment out AR specific configuration
1 parent 0456950 commit 8c99f33

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

templates/rails/config.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Add railtie configuration for dm-rails and rails components
12
gsub_file 'config/application.rb', /require 'rails\/all'/ do
23
<<-RUBY
34
# Comment out the frameworks you don't want (if you don't want ActionMailer,
@@ -11,3 +12,13 @@
1112
require 'rails/test_unit/railtie'
1213
RUBY
1314
end
15+
16+
# comment out active_record specific configuration
17+
%w[
18+
config/application.rb
19+
config/environments/development.rb
20+
config/environments/production.rb
21+
config/environments/test.rb
22+
].each do |path|
23+
gsub_file path, /^(\s*)(config\.active_record)\./, '\1# \2'
24+
end

0 commit comments

Comments
 (0)