aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-12-27 15:38:00 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-12-27 15:38:00 -0800
commit7c4fb93ac30b03c512ba163c5444eced18f12171 (patch)
treeb6ba8f45b46aaf9e908d85ff4f2b44c17f00c1df /actionpack/lib/action_dispatch
parent3a79117c77e5c5ac44a6a561af968ecd23e3024f (diff)
downloadrails-7c4fb93ac30b03c512ba163c5444eced18f12171.tar.gz
rails-7c4fb93ac30b03c512ba163c5444eced18f12171.tar.bz2
rails-7c4fb93ac30b03c512ba163c5444eced18f12171.zip
Ruby 1.9: string is not enumerable, so #exclude? is not available
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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)