# Auto Suggest/Complete

**URL:** <https://www.ruby-forum.com/t/auto-suggest-complete/142100>\
**Category:** Rails\
**Created:** [July 3, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/auto-suggest-complete/142100 "2008-07-03T12:42:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 3, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/auto-suggest-complete/142100/1 "2008-07-03T12:42:24Z")

</div>

Hello everyone,

Has anyone come up with a decent autocomplete function? And by this I  
mean a funtcion that allows the user to search a list alphabetically,  
as with Google suggest, as oppsed to simply using wildcards and the  
SQL Like function?

I’ve been looking around but to no avail…

Any help is appreciated.

j

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 4, 2008, 11:23am UTC](https://www.ruby-forum.com/t/auto-suggest-complete/142100/2 "2008-07-04T11:23:46Z")

</div>

I have to answer my own question here, which, in a way, illustrates a  
certain level of incompetence on my part.  
To search a list of names, for example, using sql alphabetically, one  
could use the like function as follows"

Select from names where name like ‘a%’

This will return all names that begin with the letter a.

j

On Jul 3, 11:41 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 4, 2008, 12:15pm UTC](https://www.ruby-forum.com/t/auto-suggest-complete/142100/3 "2008-07-04T12:15:58Z")

</div>

2 more cents

> Select from names where name like ‘a%’

if you have more than just first name, you can also use ‘%a%’ to look  
for substrings

On Jul 4, 10:23 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
