Ember.Binding.transform has been removed or replaced in the latest ember. I have a number of bindings that take this form:
valueBinding: Ember.Binding.transform({
to: function(value, binding) {
//return something
},
from: function(value, binding) {
//return something
}
}).from('parentView.content.finishBy'),
Can anyone advise me how I should update my code to the new regime?
You can add your computed property definition to
Ember.computed, seehttp://jsbin.com/awufuv/edit#source:
You can then use it like this:
See more examples in https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/computed.js#L417-434
Just to be clear: you’re not forced to add your custom computed property to
Ember.computed. You can basically declare the function anywhere in your code. Now that I think about it, you might want to add your helper to your applications namespace instead of adding / poluting it toEmber. But that’s just an issue of personal preference.