diff options
author | Xavier Noria <fxn@hashref.com> | 2011-03-23 21:52:33 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-03-23 21:52:33 +0100 |
commit | 3b91b3726dbd7ef6e1f4927d65e2cbe8da12f7c7 (patch) | |
tree | d0b29e5edb35d20eade90c31442fb7abdfe8872a /actionpack/lib/action_dispatch | |
parent | 3a7c7dc73d6111e7c821a81d9c56024dd35769a5 (diff) | |
parent | ee8ca49414271026575dab70947b446ac6e4b51a (diff) | |
download | rails-3b91b3726dbd7ef6e1f4927d65e2cbe8da12f7c7.tar.gz rails-3b91b3726dbd7ef6e1f4927d65e2cbe8da12f7c7.tar.bz2 rails-3b91b3726dbd7ef6e1f4927d65e2cbe8da12f7c7.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 7 |
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 1dba1d416c..14c424f24b 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 || {}) app, conditions, requirements, defaults, as, anchor = mapping.to_route |