Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Document `store.unregister`

  • Loading branch information...
commit 07258b9159f85f1d246194c82c9e794dc1980447 1 parent 4113c69
@PaulUithol authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 index.html
View
15 index.html
@@ -1065,7 +1065,7 @@ <h2 >Backbone.Store</h2>
</p>
<h4 class="code" id="Store-addModelScope">
- addModelScope<code>Backbone.Relational.store.addModelScope( scope&lt;object&gt; )</code>
+ addModelScope<code>Backbone.Relational.store.addModelScope(scope&lt;object&gt;)</code>
</h4>
<p>
Add a namespace on which models and collections are defined. This is especially useful when working in an
@@ -1088,6 +1088,15 @@ <h4 class="code" id="Store-reset">
Reset the <q>store</q> to it's original state. This will disable relations for all models created up to this point,
remove added model scopes, and removed all internal store collections.
</p>
+
+ <h4 class="code" id="Store-unregister">
+ unregister<code>Backbone.Relational.store.unregister(type&lt;Backbone.RelationalModel|Backbone.RelationalModel.constructor|Backbone.Collection&gt;)</code>
+ </h4>
+ <p>
+ Unregister a single model or a collection. Unregistering a model will remove a model from any relations it's involved in.
+ Internally, unregister is called when a model has been destroyed. It can also be called explicitly to on models
+ you don't want Backbone-relational to consider for relations anymore, for example to free up models used as (temporary) search results.
+ </p>
</section>
<section id="examples">
@@ -1238,6 +1247,10 @@ <h2 >Examples</h2>
<a href="https://github.com/PaulUithol/Backbone-relational/issues/419"><q>#419</q></a>:
Proper return values for single models on collection methods for Backbone 1.1.0
</li>
+ <li>
+ <a href="https://github.com/PaulUithol/Backbone-relational/commit/4113c69d3752fcac75f7a1959c77349dd4672afa"><q>4113c69</q></a>
+ `Backbone.Relational.store.unregister` now also acceps collections or a model type
+ </li>
</ul>
<h4>0.8.7
Please sign in to comment.
Something went wrong with that request. Please try again.