     if $.fn.sortable?
       @$collection.sortable
         stop: (e, ui) ->
-          collection_ids = that.$collection.find("[data-autocomplete-collection-id]").map( -> parseInt $(@).attr("data-autocomplete-collection-id") ).get()
-          that.collection_reorder(collection_ids)
+          collectionIds = that.$collection.find("[data-autocomplete-collection-id]").map( ->
+            parseInt $(@).attr("data-autocomplete-collection-id")
+          ).get()
+          that.collectionReorder(collectionIds)
 
   lookup: (event) ->
     that = @

  # collection: ->
  #   JSON.parse(@$element.attr('data-collection')) or []

  collection_ids: ->
    $.map @collection, (o) -> o.id

  index_in_collection: (id) ->
    $.inArray id, @collection_ids()

  source: (autocomplete_collection, query) ->
    url = @$element.attr('data-json-url')

  draw: (val) ->
    $li = $(document.createElement("li"))
      .addClass("autocomplete-collection-collection-item")
      .attr('data-autocomplete-collection-value', val[@options.property])
      .attr('data-autocomplete-collection-id', val.id)
      .html val[@options.property]
    $x = $(document.createElement("a"))
