aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/route.rb
diff options
context:
space:
mode:
authorBrennan Dunn <me@brennandunn.com>2008-08-28 07:53:29 -0400
committerJeremy Kemper <jeremy@bitsweat.net>2008-08-28 12:29:49 -0700
commit9cc8c0a0a18163fb6ae0f66b2513c902d19459dc (patch)
tree1731a3f436612031aec1b812fe1e2fb5b4d7da44 /actionpack/lib/action_controller/routing/route.rb
parent7bdd5b768e51f74fa437d1cc8f3c36643364c4fe (diff)
downloadrails-9cc8c0a0a18163fb6ae0f66b2513c902d19459dc.tar.gz
rails-9cc8c0a0a18163fb6ae0f66b2513c902d19459dc.tar.bz2
rails-9cc8c0a0a18163fb6ae0f66b2513c902d19459dc.zip
Routes may be restricted to lists of HTTP methods instead of a single method or :any.
[#407 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/lib/action_controller/routing/route.rb')
-rw-r--r--actionpack/lib/action_controller/routing/route.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing/route.rb b/actionpack/lib/action_controller/routing/route.rb
index 2106ac09e0..3b2cb28545 100644
--- a/actionpack/lib/action_controller/routing/route.rb
+++ b/actionpack/lib/action_controller/routing/route.rb
@@ -201,7 +201,7 @@ module ActionController
# recognition, not generation.
def recognition_conditions
result = ["(match = #{Regexp.new(recognition_pattern).inspect}.match(path))"]
- result << "conditions[:method] === env[:method]" if conditions[:method]
+ result << "[conditions[:method]].flatten.include?(env[:method])" if conditions[:method]
result
end