Text_field_with_auto_complete only for the beginning of a string?

Hi,

how do I achieve with text_field_with_auto_complete that writing
‘ipsum’ in the textbox suggest also ‘lorem ipsum’? so far it works for
me only whent I know the first letters and type them in. like ‘lo’
suggests ‘lorem ipsum’ but ‘ip’ suggests nothing.

hopefully it’s pretty easy. thanks a lot

Hi,

how do I achieve with text_field_with_auto_complete that writing
‘ipsum’ in the textbox suggest also ‘lorem ipsum’? so far it works for
me only whent I know the first letters and type them in. like ‘lo’
suggests ‘lorem ipsum’ but ‘ip’ suggests nothing.

You need to overwrite the method that does the auto complete searching
and change it from using a SQL condition “foo%” to “%foo%”. See the
docs for more info.

-philip

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs