Autocomplete select

I have around one million customers in postgre table.

I want a select box in my form when I type characters (few),
the first 10 records should be displayed. How to do this?

auto_complete_for limits it to ten entries by default I think. Check it
out here:

http://api.rubyonrails.com/classes/ActionController/Macros/AutoComplete/ClassMethods.html#M000043

You’ll also need to use the text_field_with_auto_complete or something
similar in your view code.

Neil

Here is a great tutorial that will help you!

http://www.slash7.com/articles/2005/08/13/ajaxariffic-autocomplete-
with-scriptaculous

Sunny

neilhulluni wrote:

auto_complete_for limits it to ten entries by default I think. Check it
out here:

Peak Obsession

You’ll also need to use the text_field_with_auto_complete or something
similar in your view code.

Neil

Thanks for your reply.

When I use auto_complete_for in controller, I get the following
error message:

undefined method `auto_complete_for’ for #AdminController:0x37a3318