From 733bfa63f5d8d3b963202b6d3e9f00b4db070b91 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Wed, 13 Apr 2011 00:04:40 +0800 Subject: Remove `#among?` from Active Support After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`. --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 13aef18ee1..a65f6e1fce 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1346,11 +1346,11 @@ module ActionDispatch end def resource_scope? #:nodoc: - @scope[:scope_level].among?(:resource, :resources) + @scope[:scope_level].in?([:resource, :resources]) end def resource_method_scope? #:nodoc: - @scope[:scope_level].among?(:collection, :member, :new) + @scope[:scope_level].in?([:collection, :member, :new]) end def with_exclusive_scope -- cgit v1.2.3