aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 4943ac3fa9..8f33346a4f 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1,5 +1,3 @@
-require 'active_support/core_ext/enumerable'
-
module ActionDispatch
module Routing
class Mapper
@@ -58,15 +56,15 @@ module ActionDispatch
[ normalize_path(path), options ]
end
-
+
# match "account" => "account#index"
def using_to_shorthand?(args, options)
args.empty? && options.present?
end
-
+
# match "account/overview"
def using_match_shorthand?(args, options)
- args.present? && options.except(:via).empty? && args.first.exclude?(":")
+ args.present? && options.except(:via).empty? && !args.first.include?(':')
end
def normalize_path(path)