Skip to content

Commit 37a1772

Browse files
ghoshnirmalyaNullVoxPopuli
authored andcommitted
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
1 parent aa4d89a commit 37a1772

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/integrations/ember-and-json-api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ require 'active_model_serializers/register_jsonapi_renderer'
4949

5050
```javascript
5151
// app/adapters/application.js
52+
import Ember from 'ember';
5253
import DS from 'ember-data';
5354
import ENV from "../config/environment";
55+
const { underscore, pluralize } = Ember.String;
5456

5557
export default DS.JSONAPIAdapter.extend({
5658
namespace: 'api',
@@ -61,8 +63,8 @@ export default DS.JSONAPIAdapter.extend({
6163

6264
// allows the multiword paths in urls to be underscored
6365
pathForType: function(type) {
64-
let underscored = Ember.String.underscore(type);
65-
return Ember.String.pluralize(underscored);
66+
let underscored = underscore(type);
67+
return pluralize(underscored);
6668
},
6769

6870
// allows queries to be sent along with a findRecord

0 commit comments

Comments
 (0)