Hello, I am using the following version of Ember:
DEBUG: ------------------------------- DEBUG: Ember : 2.8.2 DEBUG: Ember Data : 2.8.1 DEBUG: jQuery : 2.1.4 DEBUG: -------------------------------
I want a field behave like this: if my server response has field’s value, use it, else compute it using comput property. For example something like this:
// human.js
import DS from 'ember-data';
export default DS.Model.extend({
money: DS.attr('number'),
rich: DS.attr('boolean'),
rich: Ember.computed.gt('money', 1000000)
});
Then this human
is rich
either determine by API or computed by money he has.