diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-31 22:33:22 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-02 10:55:09 -0300 |
commit | e6331b1e97d608c46aaadd1814a1e370bdcdd40a (patch) | |
tree | 2e735bb7c2b07aec7f793e6a7b9a5025cfaccbf6 | |
parent | c544fcc8eb891e9066bae5eb1478c6823b1f6203 (diff) | |
download | rails-e6331b1e97d608c46aaadd1814a1e370bdcdd40a.tar.gz rails-e6331b1e97d608c46aaadd1814a1e370bdcdd40a.tar.bz2 rails-e6331b1e97d608c46aaadd1814a1e370bdcdd40a.zip |
Makes rails destroy scaffold don't duplicate routes.draw do |map| |map| when using the deprecated syntax
[#5263 state:committed]
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 2280cc1507..668ef48892 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -275,7 +275,7 @@ module Rails # def route(routing_code) log :route, routing_code - sentinel = /\.routes\.draw do(\s*\|map\|)?\s*$/ + sentinel = /\.routes\.draw do(?:\s*\|map\|)?\s*$/ in_root do inject_into_file 'config/routes.rb', "\n #{routing_code}\n", { :after => sentinel, :verbose => false } |