Forum: Ruby on Rails auto_complete_for - getting :id

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.
Lee (Guest)
on 2006-12-31 01:33
(Received via mailing list)
Hi,

I am trying to determine the best approach to getting the :id
associated with a selected text field using auto_complete_for.

My controller has the following:

auto_complete_for :user, :login

I'd like to get user.id rather than user.login after an item is
selected from the list.

I have looked at various solutions offered on blogs, wiki etc but would
appreciate guidance on what is considered the best approach.
This topic is locked and can not be replied to.