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

Backport modelName fix from #5406 to 3.0 #5600

Merged
merged 3 commits into from
Aug 28, 2018

Conversation

runspired
Copy link
Contributor

backports fix for modelClass.modelName from #5406 to 3.0 to resolve #5577

rwjblue and others added 3 commits August 27, 2018 18:30
On Ember 3.2 and higher, Ember uses "real" inheritance when an
`Ember.Object` is `.extend()`ed. This means that in 3.2 and higher the
`ModelClassHere.modelName` property is now being inherited (where
previously each `.extend()` reset the value to `null`).

The fix here ensures that each `ModelClass.extend()` gets its own
`modelName`...
This test was attempting to ensure that the records guid was included in
the `record.toString()` output, but changes in Ember 3.2+ changed the
default output of the class / constructor name portion (therefore
failing the assertion in a useless way).

This updates the test to add a custom `toString` to the model class so
that we can be decoupled from how Ember `.toString()`'s classes when
there is no custom `.toString` setup (because this is actually fairly
unstable version over version).
@runspired runspired merged commit 74c6996 into emberjs:release-3-0 Aug 28, 2018
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

2 participants