code: function(key, value, options) {
        var attrs, current;
  
        // Handle both `("key", value)` and `({key: value})` -style calls.
        if (_.isObject(key) || key == null) {
          attrs = key;
          options = value;
        } else {
          attrs = {};
          attrs[key] = value;
        }
        options = options ? _.clone(options) : {};
  
        // If we're "wait"-ing to set changed attributes, validate early.
        if (options.wait) {
          if (!this._validate(attrs, options)) return false;
          current = _.clone(this.attributes);
        }
  
        // Regular saves `set` attributes before persisting to the server.
        var silentOptions = _.extend({}, options, {silent: true});
        if (attrs && !this.set(attrs, options.wait ? silentOptions : options)) {
          return false;
        }
  
        // After a successful server-side save, the client is (optionally)
        // updated with the server-side state.
        var model = this;
        var success = options.success;
        options.success = function(resp, status, xhr) {
          var serverAttrs = model.parse(resp, xhr);
          if (options.wait) {
            delete options.wait;
            serverAttrs = _.extend(attrs || {}, serverAttrs);
          }
          if (!model.set(serverAttrs, options)) return false;
          if (success) {
            success(model, resp);
          } else {
            model.trigger('sync', model, resp, options);
          }
        };
  
        // Finish configuring and sending the Ajax request.
        options.error = Backbone.wrapError(options.error, model, options);
        var method = this.isNew() ? 'create' : 'update';
        var xhr = (this.sync || Backbone.sync).call(this, method, this, options);
        if (options.wait) this.set(current, silentOptions);
        return xhr;
      }
docs: Set a hash of model attributes, and sync the model to the server. If the server returns an attributes hash that differs, the model's state will be `set` again.