2012-03-25 23 views

risposta

3

Troppo tardi per la risposta, ma ... ho appena incontrato con compiti simili e risolto questo problema così:

#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 
2

ho usato Rails3-jquery-completamento automatico. In vista sarà qualcosa del tipo:

best_in_place @object, :name, :type => :input, 
    html_attrs: { "data-autocomplete" => your_autocomplete_path } 
Problemi correlati