jquery - Rails 4 Autocomplete with Simple Form - class parameter ignored -


i using simple form, along rails autocomplete gem.

i have straightforward form control, autocomplete working intended:

<%= f.input :practice, as: :autocomplete, url: autocomplete_practice_name_shifts_path, id_element: '#shift_practice_id', class: 'form-control'  %> 

this works perfectly, except class: 'form-control' parameter not being translated onto form.

if remove autocomplete parameters so:

<%= f.input :practice, id_element: '#shift_practice_id', class: 'form-control'  %> 

the class carries through correctly; such, seems autocomplete option overriding class.

can advise correct way set class on input is?

well, pass :

input_html: { class: 'form-control' } 

Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -