app/assets/javascripts/lib/autocomplete-rails.js
Function init
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function(e) {
e.delimiter = ", ";
function split( val ) {
return val.split( e.delimiter );
}
Function select
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
select: function( event, ui ) {
var terms = split( this.value );
// remove the current input
terms.pop();
// add the selected item