Forum: Ruby on Rails auto_complete_for_text_field to association

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8c49880a7f274947b01d576c5828a5f6?d=identicon&s=25 Lon Baker (spdemac)
on 2006-01-19 01:48
I am trying to set the association using an auto_complete_for field.

message -> person

To be user friendly, I want to display the person's name in the text
field, while setting the association id after selecting them from the
auto_complete_results.

To far I get some of it to work, am only get the 1st associattion_id no
matter what item I am selecting from the results.

The only reference I have seen on the list, is using on_hide, which has
not worked for me.

Has anyone else used this technique? Any tips?
This topic is locked and can not be replied to.