Skip to content

Instantly share code, notes, and snippets.

@superlou
Created August 11, 2013 02:17
Show Gist options
  • Save superlou/6203109 to your computer and use it in GitHub Desktop.
Save superlou/6203109 to your computer and use it in GitHub Desktop.
LibraryAdapter = Ember.RESTAdapter.extend
didFind: (record, id, data)->
console.log 'here'
rootKey = get(record.constructor, 'rootKey')
dataToLoad = if rootKey then data[rootKey] else data
if /^code:/.test(id)
id = dataToLoad.id
record.load(id, dataToLoad)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment