Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Created October 30, 2013 18:30
Show Gist options
  • Select an option

  • Save alexspeller/7237573 to your computer and use it in GitHub Desktop.

Select an option

Save alexspeller/7237573 to your computer and use it in GitHub Desktop.
App.Store = DS.Store.extend
pushRecord: (type, record) ->
key = type.underscore().pluralize()
payload = {}
payload[key] = [record]
@pushPayload type, payload
@getById type, record.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment