Post by Peter Cooper on June 16th, 2006
Faster Auto-Completion with Rails

- form_test_helper: Make form-related functional tests easier in Rails
- Perform Yahoo searches in 2 lines of code
- 8 More Useful Ruby Code Snippets


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.

Click here to add on del.icio.us








