Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to push record into store through the socket adapter. #34

Open
jcloutz opened this issue Nov 17, 2015 · 2 comments
Open

Unable to push record into store through the socket adapter. #34

jcloutz opened this issue Nov 17, 2015 · 2 comments

Comments

@jcloutz
Copy link

jcloutz commented Nov 17, 2015

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?

@jcloutz
Copy link
Author

jcloutz commented Nov 18, 2015

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);

@HERRKIN
Copy link

HERRKIN commented Feb 12, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants