Skip to content

Instantly share code, notes, and snippets.

@basz
Created July 4, 2018 08:43
Show Gist options
  • Select an option

  • Save basz/c854e41e51f89933a913657fb399cdd2 to your computer and use it in GitHub Desktop.

Select an option

Save basz/c854e41e51f89933a913657fb399cdd2 to your computer and use it in GitHub Desktop.
normalize(typeClass, hash) {
assert("Component payload must contain a 'name' attribute.", !isNone(hash.attributes.name));
assert("Component payload must contain a 'value' attribute.", !isNone(hash.attributes.value));
switch(hash.attributes.name) {
case orderPropertiesPath.SANDALS_CUSTOM_MADE_MODEL_COMPOSITION:
hash.type = 'dossier/order-property/sandals-custom-made-model-composition'
break;
}
return this._super(typeClass, hash);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment