# Text\_field\_with\_auto\_complete and Chrome

**URL:** <https://www.ruby-forum.com/t/text-field-with-auto-complete-and-chrome/156939>\
**Category:** Rails\
**Created:** [January 5, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-chrome/156939 "2009-01-05T16:18:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [January 5, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-and-chrome/156939/1 "2009-01-05T16:18:54Z")

</div>

My auto complete field does not work in Chrome and just wondering if  
anyone else has had this issue and have you gotten it fixed?

My view code:  
**Type in closest home airport:**   
\<%= text\_field\_with\_auto\_complete :airport, :city,  
{:value =\> @airport.city + “[” + @airport.code + “]”,  
:class =\> ‘airport\_city’}, :skip\_style =\> true,  
:select =\> ‘airport\_city’ %\>

My controler code:

auto\_complete\_for :airport, :city

def auto\_complete\_for\_airport\_city  
auto\_complete\_responder\_for\_airport\_city params[:airport][:city]  
end

def auto\_complete\_responder\_for\_airport\_city(value)  
@airports = Airport.find( :all,  
:conditions =\> [‘LOWER(city) LIKE ?’, value.downcase + ‘%’],  
:order =\> ‘city ASC’, :limit =\> 5)

```
render :partial => 'airports'

```

end

The funny tghing is that I only have this issue in Chrome and Safari and  
not IE or firefox. Thanks for any and all help,

-S
