title: ember js - Uncaught Error: Assertion Failed: Cannot delegate set
body: <p>i face this error when saving data to api</p>
  
  <pre><code>Uncaught Error: Assertion Failed: Cannot delegate set('firstName', a) to the 'content' property of object proxy &lt;&gt;: its 'content' is undefined
  </code></pre>
  
  <p>below is my code</p>
  
  <pre><code>import Ember from 'ember';
  
  
  export default Ember.ObjectController.extend({
      isValid: Ember.computed(
          'email',
          'firstName',
          'lastName',
          'twitter',
          function() {
              return !Ember.isEmpty(this.get('email')) &amp;&amp;
              !Ember.isEmpty(this.get('firstName')) &amp;&amp;
              !Ember.isEmpty(this.get('lastName')) &amp;&amp;
              !Ember.isEmpty(this.get('twitter'));
          }
          ),
      actions:{
          save: function() {
              if (this.get('isValid')) {
                  var _this = this;
                  this.get('model').save().then(function(friend) {
                      _this.transitionToRoute('friends.show', friend);
                  });
              } else {
                  this.set('errorMessage', 'You have to fill all the fields');
              }
          },
          cancel: function() {
              this.transitionToRoute('friends');
          }
  
      }
  
  });
  </code></pre>