aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2014-05-25 00:15:24 -0700
committerGuo Xiang Tan <tgx_world@hotmail.com>2014-05-25 00:17:23 -0700
commit586c346059f263aa72242a61f863396c56181c8f (patch)
treec9b8b8b8529deb02f865a5b3adf12318f0903b54 /actionpack/lib/action_dispatch/journey
parentf632f79b8dcd144408c66a544984b2ba9cf52f87 (diff)
downloadrails-586c346059f263aa72242a61f863396c56181c8f.tar.gz
rails-586c346059f263aa72242a61f863396c56181c8f.tar.bz2
rails-586c346059f263aa72242a61f863396c56181c8f.zip
Remove unnecessary flatten! method call.
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r--actionpack/lib/action_dispatch/journey/router.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb
index 2ead6a4eb3..c0317e3ad2 100644
--- a/actionpack/lib/action_dispatch/journey/router.rb
+++ b/actionpack/lib/action_dispatch/journey/router.rb
@@ -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