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

More Cleanups #4815

Merged
merged 6 commits into from
Feb 23, 2017
Merged

More Cleanups #4815

merged 6 commits into from
Feb 23, 2017

Conversation

stefanpenner
Copy link
Member

@stefanpenner stefanpenner commented Feb 22, 2017

  • remove more unnecessary modelClass reifications

cleanup

  • remove unneeded method indirection store._classKeyFor
  • improve some naming

* push modelClass lookups to places where for compat they are still needed (finders invoking adapters)
push modelClass lookups to places where for compat they are needed:

* finders
* adapters
* store’s internal _commit method
* some debug mode only code
@@ -342,7 +342,7 @@ Store = Service.extend({
createRecord(modelName, inputProperties) {
assert(`You need to pass a model name to the store's createRecord method`, isPresent(modelName));
assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${modelName}`, typeof modelName === 'string');
let normalizedModelName = this._classKeyFor(modelName);
let normalizedModelName = normalizeModelName(modelName);
Copy link
Member

Choose a reason for hiding this comment

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

@runspired I believe you recently introduced _classKeyFor as a wrapper for normalizeModelName. Are you ok with changing this back to just normalizeModelName?

@bmac
Copy link
Member

bmac commented Feb 23, 2017

lgtm 👍

@bmac bmac merged commit 47e3b86 into master Feb 23, 2017
@bmac bmac deleted the cleanup branch February 23, 2017 22:28
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.

2 participants