mirror of
https://github.com/github/rails.git
synced 2026-01-30 08:48:06 -05:00
Fix scaffold_resource generator so it respects the --pretend argument when creating the routes file. Closes #6852 [fearoffish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user