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

DRY up how attributes are deserialized #133

Merged
merged 1 commit into from Feb 10, 2018
Merged

DRY up how attributes are deserialized #133

merged 1 commit into from Feb 10, 2018

Conversation

Dhaulagiri
Copy link
Collaborator

@Dhaulagiri Dhaulagiri commented Feb 9, 2018

Closes #55

This should make it simpler to add additional properties without needing to manually serialize each and every one

@@ -7,7 +7,8 @@ export default Factory.extend({
name: function(i) {
return `User ${i}`;
},
type: 'User',
// needs to be the actual related model name for Ember Data reasons? 🤔
type: 'github-user',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is something funky happening here with how the mirage record is getting serialized which required this to get the tests to behave. Trying things in a real app I'm not seeing a similar issue.


export default DS.RESTSerializer.extend({
keyForAttribute(attr) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

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.

None yet

2 participants