 
   ajax: (method, model, options) ->
     if Offline.onLine()
-      this.prepareOptions(options)
+      @prepareOptions(options)
       Backbone.ajaxSync(method, model, options)
     else
       @storage.setItem('offline', 'true')

  # and sends every object to server using 'Backbone.sync' method
  # after that it sends deleted objects to the server
  push: ->
    this.pushItem(item) for item in @collection.dirty()
    this.flushItem(sid) for sid in @storage.destroyIds.values

  pushItem: (item) ->
    @storage.replaceKeyFields(item, 'server')

  add: (itemId) ->
    unless _.include(@values, itemId.toString())
      @values.push itemId.toString()
    @save()

  # Remove element from a list of values
  # records.remove '3'
