提交 b5b42af3 编写于 作者: J José Valim

Make the sentinel flag for route a bit more robust.

上级 6dfa8d8e
......@@ -275,7 +275,7 @@ def freeze!(args={})
#
def route(routing_code)
log :route, routing_code
sentinel = "routes.draw do |map|"
sentinel = /\.routes\.draw do(\s*\|map\|)?\s*$/
in_root do
inject_into_file 'config/routes.rb', "\n #{routing_code}\n", { :after => sentinel, :verbose => false }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册