-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* FragmentArray.createFragment should respect `type` in polymorphic arrays #316 * Remove unused test * Update tests/unit/polymorphic_test.js typo Co-authored-by: Vincent Molinié <vincentm@forestadmin.com> * refactor: convert tests to modern syntax * fix attribute name in test * fix test failure * fix FragmentArray property documentation FragmentArray#type was renamed to modelName FragmentArray#options are no longer used * reformat code * ensure that the fragment owner is set * add failing test for createRecord * fix createRecord for polymorphic fragment arrays --------- Co-authored-by: Stefan Fochler <istefo@me.com> Co-authored-by: Ilya Radchenko <knownasilya@gmail.com> Co-authored-by: Vincent Molinié <vincentm@forestadmin.com>
- Loading branch information
1 parent
c9f6ca5
commit e005411
Showing
5 changed files
with
151 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import Fragment from 'ember-data-model-fragments/fragment'; | ||
import { fragmentOwner } from 'ember-data-model-fragments/attributes'; | ||
import { attr } from '@ember-data/model'; | ||
|
||
export default class Animal extends Fragment { | ||
@attr('string') name; | ||
@fragmentOwner() zoo; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters