Skip to content

Instantly share code, notes, and snippets.

@klaaspieter
Last active December 13, 2015 20:19
Show Gist options
  • Save klaaspieter/4969157 to your computer and use it in GitHub Desktop.
Save klaaspieter/4969157 to your computer and use it in GitHub Desktop.
# This exposes the the isLoaded property from a AdapterPopulatedRecordArray which
# functions as expected. This is needed because the store will set the Model.find() recordArray
# to loaded immediately. If the behavior of Model.find() changes you can switch back
# to it's behavior by simply removing the IsLoadedSupport mixin.
App.IsLoadedSupport = Em.Mixin.create({
_content: (->
@get('content.type').find({})
).property('content')
isLoaded: (->
@get('_content.isLoaded')
).property('_content.isLoaded')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment