aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorGabriel Horner <gabriel.horner@gmail.com>2011-03-15 09:23:17 -0400
committerGabriel Horner <gabriel.horner@gmail.com>2011-03-15 09:23:17 -0400
commit61781d84c11c8b5e37ad7cca5c40864759150a33 (patch)
tree79582f63abec301fa5c84a596adc72068a78df94 /actionpack
parent21b12d89a671131f610dc5600b23cb56839e652b (diff)
downloadrails-61781d84c11c8b5e37ad7cca5c40864759150a33.tar.gz
rails-61781d84c11c8b5e37ad7cca5c40864759150a33.tar.bz2
rails-61781d84c11c8b5e37ad7cca5c40864759150a33.zip
doc :anchor option for #match in routes
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb7
1 files changed, 7 insertions, 0 deletions
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 <tt>Scoping#defaults</tt> 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)