有人能做到吗?是否可以?我正在编写一个 Rails 3 应用程序,似乎应该可以使用 jquery 自动完成和最佳位置来做到这一点,但我还没有看到它。
最佳答案
回复太晚了,但是......我刚刚遇到了类似的任务并解决了这个问题:
#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
关于ruby-on-rails - 具有自动完成功能的就地编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9864750/