Reputation: 1309
I have the following configuration:
window.App = Ember.Application.create();
DS.RESTAdapter.reopen({
host: 'https://localhost:3000/api/v1',
});
App.Store = DS.Store.extend({
revision: 11,
adapter: DS.RESTAdapter
});
But the URL that I'm trying to call is http://localhost:3000/api/v1/balance
but Ember is calling "balances" at the end. Is there a way to specify the pluralization for this? Thanks!
Upvotes: 2
Views: 116
Reputation: 47367
This is old, and should be removed, https://github.com/emberjs/data/blob/master/TRANSITION.md
App.Store = DS.Store.extend({
revision: 11,
adapter: DS.RESTAdapter
});
You define adapter's like so
For an application level adapter
App.ApplicationAdapter = DS.RESTAdapter;
For a specific model adapter
App.BalanceAdapter = DS.RESTAdapter.extend({
pathForType: function(type) {
var decamelized = Ember.String.decamelize(type);
//return Ember.String.pluralize(decamelized);
return decamelized;
}
});
Upvotes: 3