Skip to content

Rewrote api helpers to use string ids, which is what our ember client sends#950

Merged
joshsmith merged 1 commit intodevelopfrom
rewrite-controller-tests-to-use-string-ids-as-ember
Sep 19, 2017
Merged

Rewrote api helpers to use string ids, which is what our ember client sends#950
joshsmith merged 1 commit intodevelopfrom
rewrite-controller-tests-to-use-string-ids-as-ember

Conversation

@begedin
Copy link
Copy Markdown
Contributor

@begedin begedin commented Sep 18, 2017

This PR modifies the test JSON Payload helper to create relationships with keys cast to strings, to match the behavior our Ember client uses.

This change reveals a bug in the comment controller, so the PR also fixes that bug, by adding the IdsToIntegers plug into the controller pipeline. It's unfortunate that this needs to be done on a case-by-case basis right now, but once we get away from ja_resource completely, we can move that plug, as well as DataToAttributes, into a router pipeline.

Merging this PR will likely reveal bugs in several other open PRs.

@begedin begedin requested a review from joshsmith September 18, 2017 13:38
@begedin begedin force-pushed the rewrite-controller-tests-to-use-string-ids-as-ember branch from 16aa272 to 051aa46 Compare September 18, 2017 14:43
@begedin begedin force-pushed the rewrite-controller-tests-to-use-string-ids-as-ember branch from 051aa46 to 81866b5 Compare September 18, 2017 15:11
joshsmith
joshsmith previously approved these changes Sep 19, 2017
@joshsmith joshsmith force-pushed the rewrite-controller-tests-to-use-string-ids-as-ember branch from 81866b5 to dfa21f9 Compare September 19, 2017 00:30
joshsmith
joshsmith previously approved these changes Sep 19, 2017
… sends

This reveals a bug in the comment controller, which is now fixed.
@joshsmith joshsmith force-pushed the rewrite-controller-tests-to-use-string-ids-as-ember branch from dfa21f9 to c0a8d71 Compare September 19, 2017 00:39
@joshsmith joshsmith merged commit 0052126 into develop Sep 19, 2017
@joshsmith joshsmith deleted the rewrite-controller-tests-to-use-string-ids-as-ember branch September 19, 2017 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants