Skip to content

Instantly share code, notes, and snippets.

@kagemusha
Created October 1, 2013 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagemusha/6783059 to your computer and use it in GitHub Desktop.
Save kagemusha/6783059 to your computer and use it in GitHub Desktop.
Ember Data Store Synchronous Methods - not a complete list
store.getById
sync return rec from store if avail or return null
e.g.
var post = store.getById('post', 1);
filter: function(type, query, filter)
@param {Class} type
@param {Function} filter
@return {DS.FilteredRecordArray}
Takes a type and filter function, and returns a live RecordArray that
remains up to date as new records are loaded into the store or created
locally.
The callback function takes a materialized record, and returns true
if the record should be included in the filter and false if it should
not.
If any of a record's properties change, or if it changes state, the
filter function will be invoked again to determine whether it should
still be in the array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment