Has anyone been able to do this? Is it possible? I'm writing a Rails 3 app, and it seems like it should be possible to do this with jquery autocomplete and best-in-place, but I haven't seen it.
Too late for reply, but... I've just encountered with similar task and solved this problem like that:
#view
best_in_place @somewhat, :title, type: :input, inner_class: 'somewhat_title',
ok_button: 'ok', data: { autocomplete: true }
#coffee
$("span[data-autocomplete='true']").live 'click', ->
$('.somewhat_title').autocomplete
#usual autocomplete code here, nothing special
I used rails3-jquery-autocomplete. In view it'll be something like:
best_in_place @object, :name, :type => :input,
html_attrs: { "data-autocomplete" => your_autocomplete_path }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With