Skip to content

Instantly share code, notes, and snippets.

@dinnouti
dinnouti / _form.html.erb
Created October 15, 2012 22:59
Typeahead / Autocomplete with Twitter Bootstrap, Rails, simple_form
<%= f.input :nome, :collection => get_schools_name, :include_blank => false, :input_html => {:rel => 'autocomplete', :data_default => @school.nome} %>
@dinnouti
dinnouti / example1.cs.coffee
Created October 7, 2012 16:27
Replace input select with jquery ui autocomplete
asd = ->
$('.shipping').each ->
option = []
$(this).find('option').each ->
option.push $(this).text()
input = $('<input>')
input.attr('type','text')
input.attr('name', $(this).attr('name') )
input.attr('id', $(this).attr('id') )