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({
4545 this . set ( '_markedForDestruction' , true ) ;
4646 } ,
4747
48+ jsonapiType ( ) {
49+ return this . store
50+ . adapterFor ( this . constructor . modelName )
51+ . pathForType ( this . constructor . modelName ) ;
52+ } ,
53+
4854 // Blank out all relations after saving
4955 // We will use the server response includes to 'reset'
5056 // these relations
Original file line number Diff line number Diff line change @@ -50,16 +50,10 @@ const attributesFor = function(record) {
5050 return attrs ;
5151} ;
5252
53- const jsonapiType = function ( record ) {
54- return record . store
55- . adapterFor ( record . constructor . modelName )
56- . pathForType ( record . constructor . modelName ) ;
57- } ;
58-
5953const jsonapiPayload = function ( record ) {
6054 let attributes = attributesFor ( record ) ;
6155
62- let payload = { type : jsonapiType ( record ) } ;
56+ let payload = { type : record . jsonapiType ( ) } ;
6357
6458 if ( isPresentObject ( attributes ) ) {
6559 payload . attributes = attributes ;
You can’t perform that action at this time.
0 commit comments