diff options
Diffstat (limited to 'railties/lib/generator/actions.rb')
-rw-r--r-- | railties/lib/generator/actions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/generator/actions.rb b/railties/lib/generator/actions.rb index feb31b9995..8440e50733 100644 --- a/railties/lib/generator/actions.rb +++ b/railties/lib/generator/actions.rb @@ -81,12 +81,12 @@ module Rails in_root do if options[:env].nil? - gsub_file 'config/environment.rb', /(#{Regexp.escape(sentinel)})/mi do |match| + gsub_file 'config/environment.rb', /(#{Regexp.escape(sentinel)})/mi, false do |match| "#{match}\n " << data end else Array.wrap(options[:env]).each do|env| - append_file "config/environments/#{env}.rb", "\n#{data}" + append_file "config/environments/#{env}.rb", "\n#{data}", false end end end @@ -252,7 +252,7 @@ module Rails sentinel = 'ActionController::Routing::Routes.draw do |map|' in_root do - gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match| + gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi, false do |match| "#{match}\n #{routing_code}\n" end end |