mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Use the underscore-private convention, simplify
This commit is contained in:
parent
b0e62e4dc1
commit
20ccbc79c2
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user