mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05: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:
parent
c544fcc8eb
commit
e6331b1e97
1 changed files with 1 additions and 1 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue