ember-data-sails
ember-data-sails copied to clipboard
Unable to push record into store through the socket adapter.
I receive the following error when ever a record is pushed into the store.
Uncaught Error: Assertion Failed: Passing classes to store methods has been removed. Please pass a dasherized string instead of ember-testapp@model:item:
Is this a known problem, or does anyone have a known work around?
I think I figured out what was going on and it was fixed in #27. @t3rminus is there any chance that you could rebase the PR so that @huafu can merge it into master?
In sails-socket.js I changed the _handleSocketRecordCreated function to the use the model name instead of it's class reference. In my case it is expecting item and not ember-testapp@model:item
// original (not working)
store.pushPayload(type, payload)
// fixed to pass model name
store.pushPayload(type.modelName, payload);
I had the same issue. I didn't come here first lol It would have saved me a lot of time, I had do manually do it.