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:
parent
f632f79b8d
commit
586c346059
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue