提交 8ff777f6 编写于 作者: R Rafael Mendonça França

Merge pull request #20751 from repinel/remove-unnecessary-dup

Remove unnecessary `dup` from Mapper `add_route`
......@@ -1538,7 +1538,7 @@ def add_route(action, options) # :nodoc:
path = path_for_action(action, options.delete(:path))
raise ArgumentError, "path is required" if path.blank?
action = action.to_s.dup
action = action.to_s
if action =~ /^[\w\-\/]+$/
options[:action] ||= action.tr('-', '_') unless action.include?("/")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册