Sha256: 3f6806b5eda0ca4752df5c20c18f3dce33eda6c1e4e352b630e127621886eb22

Contents?: true

Size: 761 Bytes

Versions: 26

Compression:

Stored size: 761 Bytes

Contents

# TODO THis module is going to be deprecated as it has been gradually gut over time
Luca.modules.Deferrable = 
  configure_collection: (setAsDeferrable=true)->
    return unless @collection

    if _.isString( @collection ) and collectionManager = Luca.CollectionManager?.get()
      @collection = collectionManager.getOrCreate(@collection)

    # if there is already an instantiated backbone collection don't do anything
    unless @collection and _.isFunction( @collection.fetch ) and _.isFunction( @collection.reset )
      @collection = new Luca.Collection( @collection.initial_set, @collection )
    
    if @collection?.deferrable_trigger
      @deferrable_trigger = @collection.deferrable_trigger

    if setAsDeferrable
      @deferrable = @collection

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
luca-0.9.42 src/modules/deferrable.coffee
luca-0.9.4 src/modules/deferrable.coffee
luca-0.9.2 src/modules/deferrable.coffee
luca-0.9.1 src/modules/deferrable.coffee
luca-0.9.0 src/modules/deferrable.coffee
luca-0.8.599 src/modules/deferrable.coffee
luca-0.8.59 src/modules/deferrable.coffee
luca-0.8.3 src/modules/deferrable.coffee
luca-0.8.2 src/modules/deferrable.coffee
luca-0.8.06 src/modules/deferrable.coffee
luca-0.8 src/modules/deferrable.coffee
luca-0.7.92 src/modules/deferrable.coffee
luca-0.7.91 src/modules/deferrable.coffee
luca-0.7.9 src/modules/deferrable.coffee
luca-0.7.8 src/modules/deferrable.coffee
luca-0.7.7 src/modules/deferrable.coffee
luca-0.7.6 src/modules/deferrable.coffee
luca-0.7.5 src/modules/deferrable.coffee
luca-0.7.4 src/modules/deferrable.coffee
luca-0.7.3 src/modules/deferrable.coffee