@@ -89,8 +89,8 @@ DS.JsonApiAdapter = DS.RESTAdapter.extend({
89
89
* Suppress additional API calls if the relationship was already loaded via an `included` section
90
90
*/
91
91
findBelongsTo : function ( store , snapshot , url , relationship ) {
92
- var belongsTo = snapshot . belongsTo ( relationship . key ) ,
93
- belongsToLoaded = belongsTo && ! belongsTo . record . get ( 'currentState.isEmpty' ) ;
92
+ var belongsTo = snapshot . belongsTo ( relationship . key ) ;
93
+ var belongsToLoaded = belongsTo && ! belongsTo . record . get ( 'currentState.isEmpty' ) ;
94
94
95
95
if ( belongsToLoaded ) { return ; }
96
96
@@ -113,18 +113,18 @@ DS.JsonApiAdapter = DS.RESTAdapter.extend({
113
113
* and match the root key to the route
114
114
*/
115
115
updateRecord : function ( store , type , snapshot ) {
116
- var data = this . _serializeData ( store , type , snapshot ) ,
117
- id = get ( snapshot , 'id' ) ;
116
+ var data = this . _serializeData ( store , type , snapshot ) ;
117
+ var id = get ( snapshot , 'id' ) ;
118
118
119
119
return this . ajax ( this . buildURL ( type . typeKey , id , snapshot ) , 'PUT' , {
120
120
data : data
121
121
} ) ;
122
122
} ,
123
123
124
124
_serializeData : function ( store , type , snapshot ) {
125
- var serializer = store . serializerFor ( type . typeKey ) ,
126
- pluralType = Ember . String . pluralize ( type . typeKey ) ,
127
- json = { } ;
125
+ var serializer = store . serializerFor ( type . typeKey ) ;
126
+ var pluralType = Ember . String . pluralize ( type . typeKey ) ;
127
+ var json = { } ;
128
128
129
129
json . data = serializer . serialize ( snapshot , { includeId : true } ) ;
130
130
if ( ! json . data . hasOwnProperty ( 'type' ) ) {
@@ -170,7 +170,7 @@ DS.JsonApiAdapter = DS.RESTAdapter.extend({
170
170
171
171
pathForType : function ( type ) {
172
172
var decamelized = Ember . String . decamelize ( type ) ;
173
- return Ember . String . pluralize ( decamelized ) . replace ( / _ / g , '-' ) ;
173
+ return Ember . String . pluralize ( decamelized ) ;
174
174
}
175
175
} ) ;
176
176
0 commit comments