File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ export default Ember.Mixin.create({
45
45
this . set ( '_markedForDestruction' , true ) ;
46
46
} ,
47
47
48
+ jsonapiType ( ) {
49
+ return this . store
50
+ . adapterFor ( this . constructor . modelName )
51
+ . pathForType ( this . constructor . modelName ) ;
52
+ } ,
53
+
48
54
// Blank out all relations after saving
49
55
// We will use the server response includes to 'reset'
50
56
// these relations
Original file line number Diff line number Diff line change @@ -50,16 +50,10 @@ const attributesFor = function(record) {
50
50
return attrs ;
51
51
} ;
52
52
53
- const jsonapiType = function ( record ) {
54
- return record . store
55
- . adapterFor ( record . constructor . modelName )
56
- . pathForType ( record . constructor . modelName ) ;
57
- } ;
58
-
59
53
const jsonapiPayload = function ( record ) {
60
54
let attributes = attributesFor ( record ) ;
61
55
62
- let payload = { type : jsonapiType ( record ) } ;
56
+ let payload = { type : record . jsonapiType ( ) } ;
63
57
64
58
if ( isPresentObject ( attributes ) ) {
65
59
payload . attributes = attributes ;
You can’t perform that action at this time.
0 commit comments