I’m using the rails3-jquery-autocomplete gem on a field with non-unique values, but I want the results it retrieves to be duplicate-free. Any ideas on how to accomplish this?
I’m using the rails3-jquery-autocomplete gem on a field with non-unique values, but I want
Share
I had the same problem in my project https://github.com/marciomr/Terra-Livre and I solved it doing the following:
I removed the id from the json file and then retrieved uniq values.
Since I didn’t need the id it worked fine for me. I think if I need the id I can put it in extra_data, but I am not sure.
I have just forked the project with this alteration: git://github.com/marciomr/rails3-jquery-autocomplete.git