-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Determining which adapter is being used no workie #127
Comments
yes .. that figures I blew that one @FilmKnurd .. I was trying like crazy to avoid having to do return adapter instanceof ActiveModelAdapter for the using ActiveModelAdapter function , and in the meantime did not realize your idea is really great for the other two. For ActiveModelAdapter .. that one I am going to have trouble with because people don't all have that package included .. so I can't import it and assume they will have it |
actually @FilmKnurd , that plan is not going to work .. since adapter instanceof DS.RESTAdapter is true for ActiveModelAdapter since its a subclass of DS.RESTAdapter got any other ideas? this has been a thorn in my side for a long time .. could use a good idea. |
ok @FilmKnurd .. try v2.0.1 .. I think I found a solution that works. |
2.0.1 works great. Thanks! That sure is a pain having to detect the ActiveModelAdapter. |
I just upgraded to the latest (2.0.0 from 1.13.2 ) and suddenly tests started failing. The test helper
handleUpdate()
no longer mocked the API requests made by the adapter. It was mockingPATCH
for aJSONAPIAdpater
, but I'm using theRESTAdapter
which usesPUT
.I did a little digging, and I think maybe
usingAdapterType()
infixture-builder-factory
is not working. I put a breakpoint on line 18adapter.toString()
does not contain the type, so this function returns null and things just get weird from there. Consequently, all calls to useJSONAPI() were true, even though in my case it should have been false.I don't know if this is the best way, but one possible solution is to detect the instance.
The text was updated successfully, but these errors were encountered: