formatInputTooShort: "Please enter X or more characters so that you can ..."
formatResult: (variable) ->
$variable = $(variable.element)
anothervariable = $variable.data('data-name')
anotherVariableElement = $"<div class='data-name'>#{anothervariable}</div>"
return $variable + anotherVariableElement
How can I convert this to select2 version 4.0?