Forum: Ruby on Rails [ANN] Caching Auto Complete Field

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Bob S. (Guest)
on 2006-02-17 04:22
(Received via mailing list)

I've extended 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:

Bob S.

Beginner Tutorials and Plug-ins for Rails
This topic is locked and can not be replied to.