Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: b8dd28afae
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (27 sloc) 0.832 kB
<div id="{{mojit_view_id}}">
<h1>Routing</h1>
<ul>
<li>Stored in <code>routes.json</code> and can vary based on context.</li>
<li>Specify an HTTP method and a mojit action.</li>
<li>May contain Sinatra-style named params.</li>
<li>Calls an entry in <code>specs</code> or an "anonymous" mojit.</li>
<li>Can build URLs from routes using the <a href="http://developer.yahoo.com/cocktails/mojito/api/Url.common.html">url addon</a>.</li>
</ul>
<pre><code>
[{
"settings": [ "master" ],
"preso": {
"verbs": ["get"],
"path": "/slides/:slide",
"call": "preso.index"
},
"foo": {
"verbs": ["get"],
"path": "/foo",
"call": "@Foo.index",
"params": "bar=bar&quuz=quuz"
}
}]
</code></pre>
{{{nav}}}
</div>
Jump to Line
Something went wrong with that request. Please try again.