Skip to content

Commit 41894cd

Browse files
authored
Merge pull request ember-learn#597 from kategengler/kategengler-patch-1
Update writing-helpers.md Co-authored-by: Robert Jackson <[email protected]>
2 parents bfdff10 + 523d632 commit 41894cd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

guides/release/templates/writing-helpers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You can also have Ember generate the file for you from the command line:
3737
ember generate helper format-currency
3838
```
3939

40-
That file should export a function wrapped with [`Ember.Helper.helper()`](https://emberjs.com/api/ember/2.15/classes/Ember.Helper/methods/helper?anchor=helper):
40+
That file should export a function wrapped with [`helper()`](https://api.emberjs.com/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper):
4141

4242
```javascript {data-filename=app/helpers/format-currency.js}
4343
import { helper } from '@ember/component/helper';
@@ -79,7 +79,7 @@ helper again with the new values and keep the page up-to-date.
7979

8080
### Helper Names
8181

82-
Unlike [components](../../components/defining-a-component/), which require a dash in the name to follow the Custom Element spec, helper names can be single or multi-word. If your helper's name is multi-word, it should be dasherized as the examples on this page.
82+
Helper names can be single or multi-word. If your helper's name is multi-word, it should be dasherized as the examples on this page.
8383

8484
### Helper Arguments
8585

@@ -251,10 +251,10 @@ based on the implementation of Ember's rendering engine (and this may
251251
change from time to time) helpers make a poor home for state.
252252

253253
To create a class-based helper, rather than exporting a simple function, you
254-
should export a subclass of [`Ember.Helper`][1]. Helper classes must contain a
255-
[`compute`][2] method that behaves the same as the function passed to the
256-
[`helper`][3] function. In order to access a service, you must first inject it
257-
into the class-based helper. Once added, you can call the service's methods or
254+
should export a subclass of [`Helper`][1]. Helper classes must contain a
255+
[`compute`][2] method that behaves the same as the function passed to
256+
[`helper`][3]. In order to access a service, you must first inject it
257+
into the class-based helper. Once added, you can call the service's methods or
258258
access its properties from within the `compute()` method.
259259

260260
As an exercise, here is the above `format-currency` helper re-factored
@@ -402,5 +402,5 @@ type="javascript"&gt;alert('pwned!');&lt;/script&gt;</b> has joined the channel.
402402

403403
[1]: https://www.emberjs.com/api/ember/release/classes/Helper
404404
[2]: https://www.emberjs.com/api/ember/release/classes/Helper/methods/compute?anchor=compute
405-
[3]: https://www.emberjs.com/api/ember/release/classes/Helper/methods/compute?anchor=helper
405+
[3]: https://api.emberjs.com/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper
406406
[4]: https://www.emberjs.com/api/ember/release/functions/@ember%2Ftemplate/htmlSafe

0 commit comments

Comments
 (0)