Sha256: ba3cf05b3acfb632281648cacaab21b1f6ff77a690c8b6e81cb78b8c09b41da4

Contents?: true

Size: 474 Bytes

Versions: 11

Compression:

Stored size: 474 Bytes

Contents

pageflow.chart.ScrapedSitesCollection = Backbone.Collection.extend({
  model: pageflow.chart.ScrapedSite,

  name: 'scraped_sites',

  getOrFetch: function(id, options) {
    options = options || {};
    var model = this.get(id);

    if (model) {
      if (options.success) {
        options.success(model);
      }
    }
    else {
      model = new pageflow.chart.ScrapedSite({id: id});
      this.add(model);
      model.fetch(options);
    }

    return model;
  }
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pageflow-chart-2.1.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-2.0.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-1.2.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-1.1.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-1.0.1 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-1.0.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-0.2.2 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-0.2.1 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-0.2.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-0.1.1 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
pageflow-chart-0.1.0 app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js