Today I stumbled upon a nice tutorial written on Matthias Georgi's blog about using the Script.aculo.us Autocompleter.Local to reduce calls to the server when using an auto_complete_field in Rails. I had the same issue with a Rails app I was writing a while ago and solved it using a similar solution. I wrote a plugin to allow me to reuse the code at will. After reading Matthias's post I decided to update the plugin to use some of his "tricks". So here it is...
https://svn.nbarthelemy.com/plugins/local_auto_complete

Thanks Matthias!

5 Responses to “New Rails Plugin: local_auto_completer”

  1. Matthias Georgi Says:
    Nice, that was really fast! It's great to have a plugin coming out for every blog post I'm writing :) Maybe you should mention the need for a stylesheet in your plugin readme. Probably a call to auto_complete_stylesheet should do the job.
  2. Nicholas Says:
    I will make sure to add that. I was thinking about implementing the text_field_with_local_auto_complete method and rendering the stylesheet unless the :skip_style is passed.
  3. Kris Says:
    Does anyone have a live example of the new plugin in action? I'd like to see how it performs.
  4. Nicholas Says:
    I will see what I can do to set up an example and post it here.
  5. Coby Randquist Says:
    The plugin works great. I have one question though, I would like to use it in place of a select box, so it would auto complete on contact name, is there anyway to get contact id?, without doing some additional query?

Sorry, comments are closed for this article.