doc :anchor option for #match in routes
This commit is contained in:
parent
21b12d89a6
commit
61781d84c1
@ -364,6 +364,13 @@ def root(options = {})
|
||||
# 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)
|
||||
|
Loading…
Reference in New Issue
Block a user