Hi, I need some help with autocomplete module in rails 2.0.2
My app has a "product" model with "name" and "price" attributes.
There is a "purchase_order" model that is related to product through "belongs_to" and has an attribute called "amount"
I can write the product_id or the product_name in the form field and the purchase_order is created.
What I want is to show a list of products while you are writing the name so you can choose one from the list instead of writing the full product name.
I can't find the solution out there (even GoogleGod fails sometimes)
Thanks in advance
Me alegro mucho ver un espaÃ±ol tirando a los Rails!! Que bien!
En cuanto a tu pregunta... bueno, mejor en Ãngles como hay mÃ¡s gente aquÃ tambiÃ©n!
In regards to your question Francisco, check out http://demo.script.aculo.us/ajax/autocompleter their example is straight forward and probably one of the most widely used examples for AJAX autocompletion.
Hope that helps, Suerte amigo, Mateo
I was having the same problem and finding no solution. I finally found the model_auto_completer plugin and it works great. script/plugin install svn://rubyforge.org/var/svn/model-ac/trunk/vendor/plugins/model_auto_completer
I hope this helps
Thanks Matthew and Jason
I didn't understand well de autocompleter documentation so I used the model_auto_completer plugin and it's working fine.
Now I want to try something similar with "has_many :through" relationships... Well, I'll ask you again if I can't find a good solution.