Sha256: bfda84090c43c86c7c4f01575245ded34cf13f5f14dbd5e29b374d75cc175bca

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

Backbone.Ultimate ||= {}

class Backbone.Ultimate.Model extends Backbone.Model

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ultimate-base-0.2.1 app/assets/javascripts/backbone/ultimate/model.js.coffee
ultimate-base-0.2.0 app/assets/javascripts/backbone/ultimate/model.js.coffee