From 61781d84c11c8b5e37ad7cca5c40864759150a33 Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Tue, 15 Mar 2011 09:23:17 -0400 Subject: doc :anchor option for #match in routes --- actionpack/lib/action_dispatch/routing/mapper.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f67708722b..64368ca28f 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -364,6 +364,13 @@ module ActionDispatch # match 'path' => 'c#a', :defaults => { :format => 'jpg' } # # See Scoping#defaults for its scope equivalent. + # + # [:anchor] + # Boolean to anchor a #match pattern. Default is true. When set to + # false, the pattern matches any request prefixed with the given path. + # + # # Matches any request starting with 'path' + # match 'path' => 'c#a', :anchor => false def match(path, options=nil) mapping = Mapping.new(@set, @scope, path, options || {}).to_route @set.add_route(*mapping) -- cgit v1.2.3