codecombat/app/collections/CocoCollection.coffee

11 lines
266 B
CoffeeScript
Raw Normal View History

2014-01-03 13:32:13 -05:00
module.exports = class CocoCollection extends Backbone.Collection
loaded: false
initialize: ->
super()
@once 'sync', =>
@loaded = true
model.loaded = true for model in @models
getURL: ->
return if _.isString @url then @url else @url()