aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-04-17 17:08:49 +0100
committerGonçalo Silva <goncalossilva@gmail.com>2011-04-17 17:08:49 +0100
commit1c2b2233c3a7ec76c0a0eddf5b8be45c489be133 (patch)
tree56f2b767c3a4f1f14c51606bf2cbb714a98c5f89 /actionpack/lib/action_dispatch/routing
parent8d558cb1b069410c8f693295c9c4e2ffc9661e06 (diff)
parentb6843f22ac42b503f6b8ac00105ca0679049be7d (diff)
downloadrails-1c2b2233c3a7ec76c0a0eddf5b8be45c489be133.tar.gz
rails-1c2b2233c3a7ec76c0a0eddf5b8be45c489be133.tar.bz2
rails-1c2b2233c3a7ec76c0a0eddf5b8be45c489be133.zip
Merge branch 'master' of https://github.com/rails/rails into performance_test
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 35be0b3a27..a65f6e1fce 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1,6 +1,7 @@
require 'erb'
require 'active_support/core_ext/hash/except'
require 'active_support/core_ext/object/blank'
+require 'active_support/core_ext/object/inclusion'
require 'active_support/inflector'
require 'action_dispatch/routing/redirection'
@@ -1345,11 +1346,11 @@ module ActionDispatch
end
def resource_scope? #:nodoc:
- [:resource, :resources].include?(@scope[:scope_level])
+ @scope[:scope_level].in?([:resource, :resources])
end
def resource_method_scope? #:nodoc:
- [:collection, :member, :new].include?(@scope[:scope_level])
+ @scope[:scope_level].in?([:collection, :member, :new])
end
def with_exclusive_scope