Fix #1978 - Correctly document model.urlRoot and collection.url

This commit is contained in:
Casey Foster
2012-12-20 07:19:45 -08:00
parent 5a3ec24cc9
commit 236c1ae02a

View File

@@ -1333,7 +1333,7 @@ account.set({access: "unlimited"}, {
<br />
Returns the relative URL where the model's resource would be located on
the server. If your models are located somewhere else, override this method
with the correct logic. Generates URLs of the form: <tt>"/[collection.url]/[id]"</tt>
with the correct logic. Generates URLs of the form: <tt>"[collection.url]/[id]"</tt>
by default, but you may override by specifying an explicit <tt>urlRoot</tt>
if the model's collection shouldn't be taken into account.
</p>
@@ -1352,7 +1352,7 @@ account.set({access: "unlimited"}, {
<br />
Specify a <tt>urlRoot</tt> if you're using a model <i>outside</i> of a collection,
to enable the default <a href="#Model-url">url</a> function to generate
URLs based on the model id. <tt>"/[urlRoot]/id"</tt><br />
URLs based on the model id. <tt>"[urlRoot]/id"</tt><br />
Normally, you won't need to define this.
Note that <tt>urlRoot</tt> may also be a function.
</p>