Where do I specify the pluralization of a model in Ember Data?

outside2344 picture outside2344 · Jun 4, 2012 · Viewed 7.1k times · Source

I have a model type that ends in -y: Security

How do I tell Ember Data to use /securities instead of /securitys to find resources for this?

Answer

willimus picture willimus · Jan 9, 2013

Adding a hash to the create method doesn't seem to work with the latest version of Ember Data. I got the RESTAdapter.configure method to work as expected using the suggestion in this ticket: https://github.com/emberjs/website/pull/218 .

DS.RESTAdapter.configure("plurals", { person: "people" });
App.Store = DS.Store.extend({
  revision: 11,
  adapter: DS.RESTAdapter.create({
    namespace: 'api'
  })
});