Use the underscore-private convention, simplify

This commit is contained in:
Kane York 2015-06-25 12:53:50 -07:00
parent b0e62e4dc1
commit 20ccbc79c2

View File

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