I just noticed that the auto_complete_result method in the
auto_complete plugin calls the field (as opposed to the method) to
generate the result list.
Thanks for the tip!
I totally agree with you that the method makes more sense (and allows
for more flexibility) and I have implemented the same change in my
application based on your code.
My person model has first_name and last_name fields so to make a list of
person results, I would have to choose between displaying either first
name or last name in the auto-complete result list, which isn’t
acceptable. So I created a method full_name that combines the two fields
and after implementing your changes, I am able to populate the result
list using the full_name method call instead of one of the fields.
tekwiz wrote:
I just noticed that the auto_complete_result method in the
auto_complete plugin calls the field (as opposed to the method) to
generate the result list.