Modified some code and removed unnecessary code from the ember and json api doc (#1852)

* modified some code and removed unnecessary code from the ember abd json api doc

* using es6 imports
This commit is contained in:
Nirmalya Ghosh 2016-07-20 19:49:59 +05:30 committed by L. Preston Sego III
parent aa4d89ab47
commit 37a17723cf

View File

@ -49,8 +49,10 @@ require 'active_model_serializers/register_jsonapi_renderer'
```javascript
// app/adapters/application.js
import Ember from 'ember';
import DS from 'ember-data';
import ENV from "../config/environment";
const { underscore, pluralize } = Ember.String;
export default DS.JSONAPIAdapter.extend({
namespace: 'api',
@ -61,8 +63,8 @@ export default DS.JSONAPIAdapter.extend({
// allows the multiword paths in urls to be underscored
pathForType: function(type) {
let underscored = Ember.String.underscore(type);
return Ember.String.pluralize(underscored);
let underscored = underscore(type);
return pluralize(underscored);
},
// allows queries to be sent along with a findRecord