Skip to content

Commit

Permalink
apply [5790] to 1.2 stable branch
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
technoweenie committed Dec 26, 2006
1 parent 4aa9335 commit df27fb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions 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]
Expand Down
6 changes: 4 additions & 2 deletions railties/lib/rails_generator/commands.rb
Expand Up @@ -342,8 +342,10 @@ def route_resources(*resources)
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

Expand Down

0 comments on commit df27fb8

Please sign in to comment.