# Autocomplete - Search Multiple Tables

**URL:** <https://www.ruby-forum.com/t/autocomplete-search-multiple-tables/192035>\
**Category:** Rails\
**Created:** [July 22, 2010, 6:26pm UTC](https://www.ruby-forum.com/t/autocomplete-search-multiple-tables/192035 "2010-07-22T18:26:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asherwood](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@asherwood](https://www.ruby-forum.com/u/asherwood)\
**Post date:** [July 22, 2010, 6:26pm UTC](https://www.ruby-forum.com/t/autocomplete-search-multiple-tables/192035/1 "2010-07-22T18:26:52Z")

</div>

I’m trying to implement Autocomplete on my site and allow customers to  
search for restaurants by name or city all from one search box.

I can’t seem how to get one edit field to interact with Autocomplete  
from multiple controllers. I can add the appropriate code into the  
controllers to allow access on the page, but how would I modify:

\<% text\_field\_with\_auto\_complete :restaurant, :name, {}, {method =\>  
:get} %\>

To allow it to also pull from :city, :name to display mixed results in  
the list for the customer to select?

Thanks in advance.

Scott
