Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Makes rails destroy scaffold don't duplicate routes.draw do |map| |ma…

…p| when using the deprecated syntax

[#5263 state:committed]
  • Loading branch information...
commit e6331b1e97d608c46aaadd1814a1e370bdcdd40a 1 parent c544fcc
@spastorino spastorino authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/generators/actions.rb
View
2  railties/lib/rails/generators/actions.rb
@@ -275,7 +275,7 @@ def freeze!(args={})
#
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 }
Please sign in to comment.
Something went wrong with that request. Please try again.