Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Faster Auto-Completion with Rails

By Peter Cooper / June 16, 2006

Derek Haynes laments:

Auto-Complete is a great tool when it provides possible results BEFORE you finish typing. Unfortunately, using Rails’s included AJAX helpers to query the database as you type often results in a large delay before matches are returned.

There have been small hacks from several people to help resolve this, but Derek presents a simple local_auto_complete_field helper (with source to use right away) that lets you specify some pre-fetched results for the autocompleter to use right away.

Other Posts to Enjoy

Twitter Mentions