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

misc cleanup #4813

Merged
merged 1 commit into from
Feb 22, 2017
Merged

misc cleanup #4813

merged 1 commit into from
Feb 22, 2017

Conversation

stefanpenner
Copy link
Member

@stefanpenner stefanpenner commented Feb 22, 2017

  • avoid needly internalModel -> type conversion, when the information is already present on the internalModel
  • make asserts more consistent (ES6 interpolation etc)
  • rename trueModelName to normalizedModelName

@@ -746,7 +746,7 @@ Store = Service.extend({

let fetchedInternalModel = this._findEmptyInternalModel(internalModel, options);

return promiseRecord(fetchedInternalModel, "DS: Store#findRecord " + internalModel.typeKey + " with id: " + get(internalModel, 'id'));
return promiseRecord(fetchedInternalModel, `DS: Store#findRecord ${internalModel.modeName} with id: ${internalModel.id}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

modelName* not modeName

let pendingFetchItem = {
internalModel,
resolver,
options
};

let modelClass = internalModel.type; // TODO: is this needed?
Copy link
Contributor

Choose a reason for hiding this comment

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

no, this can be refactored to modelName. If so, this._pendingFetch should be refactored as well as we don't beed it to expecting modelClass

Copy link
Member Author

Choose a reason for hiding this comment

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

Ya likely later PR, i think the review gods will be sad with the size of this one.

* avoid needly internalModel -> type conversion, when the information is already present on the internalModel
* make asserts more consistent (ES6 interpolation etc)
* rename trueModelName to normalizedModelName
Copy link
Member

@hjdivad hjdivad left a comment

Choose a reason for hiding this comment

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

LGTM

@stefanpenner stefanpenner merged commit 11e1347 into master Feb 22, 2017
@stefanpenner stefanpenner deleted the cleanup branch February 22, 2017 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants