Merge pull request #3567 from riking/patch-1

FEATURE: addPluralization() in the store adapter
This commit is contained in:
Robin Ward 2015-06-25 15:54:38 -04:00
commit 10460330e8
1 changed files with 6 additions and 1 deletions

View File

@ -37,8 +37,13 @@ function findAndRemoveMap(type, id) {
flushMap();
export default Ember.Object.extend({
_plurals: {},
pluralize(thing) {
return thing + "s";
return this._plurals[thing] || thing + "s";
},
addPluralization(thing, plural) {
this._plurals[thing] = plural;
},
findAll(type) {