   updateRecord: (store, type, record) ->
     json = this.serialize(record, {associations: true, includeId: true })
     delete json.history
-    @_update_attachmnets(record, json)
+    @_updateAttachmnets(record, json)
     this.ajax(record.get('id'), 'PUT', {
       data: json,
       context: this,

    id = Ember.get(record, "#{relationship.key}.#{id_key}")
    hash[key] = id if this.get('addEmptyBelongsTo') || !Ember.isEmpty(id)

DS.CouchDBAdapter = DS.Adapter.extend
  typeAttribute: 'ember_type'
  typeViewName: 'by-ember-type'

  extract: (loader, json, type) ->
    this.extractRecordRepresentation(loader, type, json)

  extractAttachments: (attachments, type, hash) ->
    _attachments = []
    for k, v of attachments
      key = "#{hash._id}/#{k}"
