public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
Add more advanced nested routes examples to Merb::Router::Behavior#match 
documentation.
Michael S. Klishin (author)
Fri May 16 16:44:20 -0700 2008
commit  24331d46eb02ccf3c7fa658a74e58dbd6cd4c1ad
tree    b98b4e2d28102783831bdea656cbeb2b840db954
parent  c53276953f5ad83c328c0efebadfd599ef6f91a4
...
111
112
113
114
 
115
116
117
 
118
119
120
 
121
122
123
 
124
125
126
127
128
...
145
146
147
148
 
149
150
151
152
 
153
154
 
 
 
 
155
156
157
...
111
112
113
 
114
115
116
 
117
118
119
 
120
121
122
 
123
124
125
126
127
128
...
145
146
147
 
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
0
@@ -111,16 +111,16 @@
0
       # Addational conditions that the request must meet in order to match.
0
       # the keys must be methods that the Merb::Request instance will respond
0
       # to. The value is the string or regexp that matched the returned value.
0
- # Conditions are inherited by child routes.
0
+ # Conditions are inherited by child routes.
0
       #
0
       # The Following have special meaning:
0
- # * :method -- Limit this match based on the request method. (GET,
0
+ # * :method -- Limit this match based on the request method. (GET,
0
       # POST, PUT, DELETE)
0
       # * :path -- Used internally to maintain URL form information
0
- # * :controller and :action -- These can be used here instead of '#to', and
0
+ # * :controller and :action -- These can be used here instead of '#to', and
0
       # will be inherited in the block.
0
       # * :params -- Sets other key/value pairs that are placed in the params
0
- # hash. The value must be a hash.
0
+ # hash. The value must be a hash.
0
       # &block::
0
       # Passes a new instance of a Behavior object into the optional block so
0
       # that sub-matching and routes nesting may occur.
0
0
0
@@ -145,13 +145,18 @@
0
       # r.match ('/foo', :user_agent => /(MSIE|Gecko)/ )
0
       # .to({:controller=>'foo', :action=>'popular')
0
       #
0
- # #Route GET and POST requests to different actions (see also #resources)
0
+ # # Route GET and POST requests to different actions (see also #resources)
0
       # r.match('/foo', :method=>:get).to(:action=>'show')
0
       # r.mathc('/foo', :method=>:post).to(:action=>'create')
0
       #
0
       # # match also takes regular expressions
0
+ #
0
       # r.match(%r[/account/([a-z]{4,6})]).to(:controller => "account",
0
       # :action => "show", :id => "[1]")
0
+ #
0
+ # r.match(/\/?(en|es|fr|be|nl)?/).to(:language => "[1]") do |l|
0
+ # l.match("/guides/:action/:id").to(:controller => "tour_guides")
0
+ # end
0
       #---
0
       # @public
0
       def match(path = '', conditions = {}, &block)

Comments

    No one has commented yet.