From dd0260e435a6c8f9e7dc3008624d3a9f6b62bfa2 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 17 May 2016 11:23:32 +0800 Subject: [PATCH] Improve example for `addStorePluralization`. --- .../javascripts/discourse/lib/plugin-api.js.es6 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 index 959bf558798..b7e3eb040ec 100644 --- a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 +++ b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 @@ -295,7 +295,17 @@ class PluginApi { /** * 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) { this.container.lookup("store:main").addPluralization(thing, plural);