lib/base/save.js
function(options) {
    var self = this
    options = options || {}

    if (typeof options === 'function') throw new Error('then!')
    return self
      .validate()
      .then(function() {
        return self._create_or_update(options)
      })
      .then(function() {
        // eliminate changes -> we just saved it to the database!
        self.changes = {}
      })
      .then(function() {
        return self
      })
  }
function(options) {
    var self = this
    options = options || {}

    if (typeof options === 'function') throw new Error('then!')
    return self
      .validate()
      .then(function() {
        return self._create_or_update(options)
      })
      .then(function() {
        // eliminate changes -> we just saved it to the database!
        self.changes = {}
      })
      .then(function() {
        return self
      })
  }
function ( options ) { var self = this options = options || { } if ( typeof options === 'function' ) throw new Error ( 'then!' ) return self . validate ( ) . then ( function ( ) { return self . _create_or_update ( options ) } ) . then ( function ( ) { // eliminate changes -> we just saved it to the database! self . changes = { } } ) . then ( function ( ) { return self } ) }
Save the current record
@class Record
@method save
Save the current record