mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Makes rails destroy scaffold don't duplicate routes.draw do |map| |map| when using the deprecated syntax
[#5263 state:committed]
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user