Skip to content

Instantly share code, notes, and snippets.

@janroesner
Created November 25, 2012 20:28
Show Gist options
  • Save janroesner/4145204 to your computer and use it in GitHub Desktop.
Save janroesner/4145204 to your computer and use it in GitHub Desktop.
Fetching or not
initialize: (barId, foozId)->
@collection = Global().cache.get(FoosCollection, barId, foozId)
if @collection.isEmpty()
@collection.fetch()
else
@collection.trigger 'reset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment