Sha256: 8a18c7e9d3d9ba478b1c5792c313d4b9ec3419ebed60051f39a462fd65acfe65

Contents?: true

Size: 460 Bytes

Versions: 5

Compression:

Stored size: 460 Bytes

Contents

#= require ./base

# TODO ready options

class Ultimate.Backbone.Collection extends Backbone.Collection

  constructor: ->
    Ultimate.Backbone.debug ".Collection.constructor()", @
    super

  ready: (callback, context = @) ->
    unless @length
      @readyDeferred ||= $.Deferred()
      @readyDeferred.done =>
        callback.apply context, [@]
      @fetch success: (=> @readyDeferred.resolve()), silent: true
    else
      callback.apply context, [@]

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ultimate-base-0.3.3.0 app/assets/javascripts/ultimate/backbone/collection.js.coffee
ultimate-base-0.3.2.1 app/assets/javascripts/ultimate/backbone/collection.js.coffee
ultimate-base-0.3.2 app/assets/javascripts/ultimate/backbone/collection.js.coffee
ultimate-base-0.3.1.1 app/assets/javascripts/ultimate/backbone/collection.js.coffee
ultimate-base-0.3.1 app/assets/javascripts/ultimate/backbone/collection.js.coffee