Auto_complete with has_one association

Hi,
Have an issue with the rails auto complete, it works fine but I don't
know how to find the id element search in the textfield.

Here is what I've done:
<%= text_field_with_auto_complete :user, :ville_name, { :size => 15 },
{ :url => formatted_villes_path(:js), :method => :get, :param_name =>
'search' } %>

Model:
class User < ActiveRecord::Base
  attr_accessible :email, :ville_id, :newsletters, :role, :gender,
:first_name, :last_name, :birth_date
  serialize :newsletters

  has_one :ville

  GENDERS = %w(Homme Femme)
  ROLES = %w(Admin Business User)

  def full_name
  [@first_name, @last_name].join(' ')
  end

  def ville_name
    ville.name if ville
  end

  def ville_name=(name)
    self.ville = Ville.find_or_create_by_name(name) unless name.blank?
  end

end

I want to find the "ville" ID typed in the auto complete field.

Greg