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?
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: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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs