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

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



I've extended script.aculo.us to have the autocompleter cache it results
in
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
just
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
act
like a '%filter%'.



It's also a good example of how you can extend
script.aculou.us/prototype
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:



http://www.railtie.net/articles/2006/02/16/extendi...





Bob S.

http://www.railtie.net/

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