mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 12:43:54 -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();
|
||||
|
||||
export default Ember.Object.extend({
|
||||
plurals: {},
|
||||
_plurals: {},
|
||||
pluralize(thing) {
|
||||
if (this.get('plurals')[thing]) {
|
||||
return this.get('plurals')[thing];
|
||||
}
|
||||
return thing + "s";
|
||||
return this._plurals[thing] || thing + "s";
|
||||
},
|
||||
|
||||
addPluralization(thing, plural) {
|
||||
this.get('plurals')[thing] = plural;
|
||||
this._plurals[thing] = plural;
|
||||
},
|
||||
|
||||
findAll(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user