Sha256: d791f2d5ecde799ad9c95e4877367750b86ce531bd20a7d536be8e107169956b

Contents?: true

Size: 642 Bytes

Versions: 5

Compression:

Stored size: 642 Bytes

Contents

# TODO
# 
# This is horrendous code.  I need to replace it ASAP
Luca.concerns.Deferrable = 
  configure_collection: (setAsDeferrable=true)->
    return unless @collection

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

    if _.isObject(@collection) and not Luca.isBackboneCollection(@collection) 
      @collection = new Luca.Collection( @collection.initial_set, @collection )
    
    if @collection?.deferrable_trigger
      @deferrable_trigger = @collection.deferrable_trigger

    if setAsDeferrable
      @deferrable = @collection

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
luca-0.9.91 app/assets/javascripts/luca/concerns/deferrable.coffee
luca-0.9.9 app/assets/javascripts/luca/concerns/deferrable.coffee
luca-0.9.899 app/assets/javascripts/luca/concerns/deferrable.coffee
luca-0.9.89 app/assets/javascripts/luca/concerns/deferrable.coffee
luca-0.9.8 app/assets/javascripts/luca/concerns/deferrable.coffee