mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Improve example for addStorePluralization
.
This commit is contained in:
parent
ce5867cce2
commit
dd0260e435
@ -295,7 +295,17 @@ class PluginApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a pluralization to the store
|
* Adds a pluralization to the store
|
||||||
* api.addPluralization('mouse', 'mice')
|
*
|
||||||
|
* Example:
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* api.addStorePluralization('mouse', 'mice');
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* this.store.find('mouse');
|
||||||
|
* ```
|
||||||
|
* will issue a request to `/mice.json`
|
||||||
**/
|
**/
|
||||||
addStorePluralization(thing, plural) {
|
addStorePluralization(thing, plural) {
|
||||||
this.container.lookup("store:main").addPluralization(thing, plural);
|
this.container.lookup("store:main").addPluralization(thing, plural);
|
||||||
|
Loading…
Reference in New Issue
Block a user