title: Why when I click on the update button error TypeError: r is undefined happen?
body: <p>The error in firefox browser as follows: TypeError: r is undefined</p>
  
  <p>This is the chrome browser:
  Uncaught TypeError: Cannot read property 'data' of undefined</p>
  
  <p>I also did a video for a better understanding.</p>
  
  <p>The error occurs when I changed the values ​​in a field</p>
  
  <p><a href="http://jsfiddle.net/mSRUe/19/embedded/result/" rel="noreferrer"><strong>jsfiddle code</strong></a></p>
  
  <p><a href="http://youtu.be/Ae5u7mFw79A" rel="noreferrer"><strong>youtube video</strong></a></p>
  
  <p><strong>button code update</strong> </p>
  
  <pre class="lang-js prettyprint-override"><code>      save: function (e) {
              var that = this;
              $.ajax({
  
                  url: '/api/apdevice',
                  type: e.model.id == null ? 'POST' : 'PUT',
                  contentType: 'application/json',
                  data: JSON.stringify(e.model),
                  success: function (data) {
                      alert('yes');
                      that.refresh();
                  },
  
                  error: function (data) {
                      alert('no');
                      that.cancelRow();
                  }
  
              });
          }
  </code></pre>