chore: 🤖 introduce Scope model with self relationships

This commit is contained in:
Randall Morey committed 2020-07-14 18:47:35 -04:00
1 parent a02c7c656b
commit eb4b29ac1b
5 files changed
+108

No files matched your search

@@ -17,6 +17,15 @@ export default class ApplicationSerializer extends RESTSerializer {
return underscore(attr);
}
/**
* Generates an underscored key for the relationship ending in `_id`.
* @param {string} rel
* @return {string}
*/
keyForRelationship(rel) {
return `${underscore(rel)}_id`;
}
/**
* If an attribute is annotated as readOnly in the model, don't serialize it.
* Otherwise delegate to default attribute serializer.