Auto_complete_for - getting :id

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.