diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/commands.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index d395067a5c..6efcb9f9db 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix scaffold_resource generator so it respects the --pretend argument when creating the routes file. Closes #6852 [fearoffish] + * Fix Webrick Daemon dispatching bug regarding a bad current working directory. Closes #4899 [Rick Olson] * Make config.plugins affect the load path and the dependencies system. Allows you to control plugin loading order, and keep disabled plugins off the load path. [James Adam] diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index 8db14302da..783d9aeb3a 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -342,8 +342,10 @@ module Rails sentinel = 'ActionController::Routing::Routes.draw do |map|' logger.route "map.resources #{resource_list}" - gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match| - "#{match}\n map.resources #{resource_list}\n" + unless options[:pretend] + gsub_file 'config/routes.rb', /(#{Regexp.escape(sentinel)})/mi do |match| + "#{match}\n map.resources #{resource_list}\n" + end end end |