Skip to content

Commit

Permalink
[FEAT] Add fpe-computed codemod and fixtures (#731)
Browse files Browse the repository at this point in the history
[FEAT] Add fpe-computed codemod and fixtures
  • Loading branch information
rajasegar authored and Kelly Selden committed Nov 7, 2019
1 parent 1588042 commit ec4eb51
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { computed } from '@ember/object';
import { on } from '@ember/object/evented';
import Controller from '@ember/controller';
import Ember from 'ember';
Expand Down Expand Up @@ -25,6 +26,10 @@ export default Controller.extend({
// Executes whenever the "value" property changes
}),

fullName3: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
}),

actions: {
foo(object) {
this.doStuff(object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default Ember.Controller.extend({
// Executes whenever the "value" property changes
}.observes('value'),

fullName3: function() {
return `${this.firstName} ${this.lastName}`;
}.computed('firstName', 'lastName'),

actions: {
foo(object) {
Ember.propertyWillChange(object, 'someProperty');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { computed } from '@ember/object';
import { on } from '@ember/object/evented';
import Controller from '@ember/controller';
import Ember from 'ember';
Expand Down Expand Up @@ -25,6 +26,10 @@ export default Controller.extend({
// Executes whenever the "value" property changes
}),

fullName3: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
}),

actions: {
foo(object) {
this.doStuff(object);
Expand Down

0 comments on commit ec4eb51

Please sign in to comment.