               callback(params)
             else
               $.ajax(path, {
-                data: $.extend({}, paramsCollection($element), {init: true, item_ids: id}),
+                data: $.extend({}, paramsCollection($element, ''), {init: true, item_ids: id}),
                 dataType: "json"
               }).done((data) ->
                 if(data != null)

      result = '<span class="'+classes.join(' ')+'">'+item.text+'</span>'
    result

  window.paramsCollection = ($input)->
    additionalUserData = $input.data('s2-options')
    paramsCollection = {}
    if additionalUserData isnt `undefined`
      additionalAjaxData = additionalUserData['additional_ajax_data']
      if additionalAjaxData isnt `undefined`

          functionCollection = window[additionalAjaxData['function']]($input, term)
        $(additionalAjaxData['selector']).each (index, el) ->
          $el = $(el)
          collection[$el.attr('name')] = $el.val()
          return
        $.extend(collection, additionalAjaxData['params'], functionCollection)
        delete collection[$input.attr('name')]
    collection

  window.initAutoAjaxSelect2 = ->
    # @todo: need to refactor this hell
