Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2774 from givanse/deprecate-ember-k
Browse files Browse the repository at this point in the history
deprecate Ember.K
  • Loading branch information
rwjblue authored Dec 26, 2016
2 parents a957e42 + 7299e24 commit 6372840
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions source/deprecations/v2.x.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -858,3 +858,38 @@ Index Content
For more informations of how to use `ember-elsewhere`, please visit the official
documentation [here](https://github.com/ef4/ember-elsewhere#ember-elsewhere).
### Deprecations Added in 2.12
#### `Ember.K`
##### until: 3.0.0
##### id: ember-metal.ember-k
Using `Ember.K` is deprecated in favor of defining a function inline. See [RFC 0178](https://github.com/emberjs/rfcs/blob/master/text/0178-deprecate-ember-k.md).
You can use the addon [ember-watson](https://github.com/abuiles/ember-watson#remove-usages-of-emberk) to automate the removal of `Ember.K` from your application.
Example object:
```js
Ember.Object.extend({
someFun: Ember.K
});
```
Command:
```sh
ember watson:remove-ember-k --empty
```
The result will be:
```js
Ember.Object.extend({
someFun() {}
});
```
If for some reason your app depends on the ability to chain `Ember.K` invocations, you can use the flag `--return-this`. It will replace `Ember.K` with a function that returns `this`.

0 comments on commit 6372840

Please sign in to comment.