Using the option, :datayou can set the attributes data-in the generated span, not on input.
If you want to add attributes to the generated element input, you need to use the options :html_attrs:
<%= best_in_place @user, :city, :type=> :input,
:html_attrs => {:'data-provide' => "typeahead",
:'data-source' => City.getcities.to_json} %>
- @Nick Ginanto - typeahead , (, - bootstrap )
, , :
$('ul.typeahead').live('mousedown', function(e) { e.preventDefault(); });