I’ve extended script.aculo.us to have the autocompleter cache it results
the browser and only callback to the server when you clear your filter.
This provides good performance for lists with lots of elements on a busy
site. Typically, your initial result set doesn’t actually change, items
get filtered out.
Why have your database perform this simple filtering when the client can
easily do it for you.
Right now, it acts like a sql ‘filter%’ but can easily be modified to
like a ‘%filter%’.
It’s also a good example of how you can extend
with new functionality without modifying the source files, similar in
concept to Rails plugins.
Hope someone finds it useful.
You can download it and see it in action here:
Beginner Tutorials and Plug-ins for Rails