import DS from 'ember-data'; const { attr } = DS; export default DS.Model.extend({ cid: DS.attr('string'), company_name: DS.attr('string'), address1: DS.attr('string'), address2: DS.attr('string'), address3: DS.attr('string'), town: DS.attr('string'), county: DS.attr('string'), postcode: DS.attr('string'), country: DS.attr('string'), pcontact: DS.attr('string'), ocontact: DS.attr('string'), mobile: DS.attr('string'), email: DS.attr('string'), needCompany: function() { console.log('NeedCompany'); if (typeof this.get('cid') !== 'undefined') { return true; } else { return false; } }.property('cid') });