   serializer: DS.CouchDBSerializer
 
   _ajax: (url, type, hash) ->
+    if url.split("/").pop() == "" then url = url.substr(0, url.length - 1)
     hash.url = url
     hash.type = type
     hash.dataType = 'json'

      include_docs: true
      keys: ids

    this.ajax('_all_docs', 'POST', {
      data: data
      context: this
      success: (data) ->

    hash._id || hash.id

  stringForType: (type) ->
    type = type.toString()
    if type.search(".") < 0
      type
    else
      pattern = /((?:.*))\.(\w+)/ig
      reg_array = pattern.exec(type)
      reg_array[reg_array.length - 1].toString().toLowerCase()

  getRecordRevision: (record) ->
    record.get('_data.attributes._rev')
