title: Clear all elements from Backbone Collection and remove them from the associated Lawnchair
body: <p>I am using Backbone.js, <a href="http://westcoastlogic.com/lawnchair/" rel="nofollow">Lawnchair</a>, and <a href="https://github.com/niallsmart/Backbone.Lawnchair/blob/master/backbone.lawnchair.js" rel="nofollow">backbone.lawnchair.js</a>.</p>
  
  <p>I was wondering what the correct way to "empty" a collection (both from the application and from localStorage) would be?</p>
  
  <p>Currently, I am employing something along these lines:</p>
  
  <pre><code>Favorites.Collection = Backbone.Collection.extend({
    model: Favorites.Model,
    lawnchair: new Lawnchair({ name: "favorites" }, function(e){}),
  
    empty: function(){
      this.lawnchair.nuke();
      this.fetch();
    }
  });
  </code></pre>
  
  <p>This is essentially destroying the elements in localStorage (lawnchair provides the nuke method) and fetching from localStorage. This seems a bit clunky, and I was wondering if I am thinking about this right - or if there is a better way.</p>
  
  <p>Cheers!</p>