1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unnecessary flatten! method call.

This commit is contained in:
Guo Xiang Tan 2014-05-25 00:15:24 -07:00
parent f632f79b8d
commit 586c346059

View file

@ -115,7 +115,7 @@ module ActionDispatch
def get_routes_as_head(routes)
precedence = (routes.map(&:precedence).max || 0) + 1
routes = routes.select { |r|
routes.select { |r|
r.verb === "GET" && !(r.verb === "HEAD")
}.map! { |r|
Route.new(r.name,
@ -126,8 +126,6 @@ module ActionDispatch
route.precedence = r.precedence + precedence
end
}
routes.flatten!
routes
end
end
end