So the documentation says in order to use text_field_with_auto_complete you need to do: # view Just a little test: <%= text_field_with_auto_complete :contact, :name %> # controller auto_complete_for :contact, :name In this basic example you are working with the table "contacts" and the attribute "name" on that table. But, when you are dealing with a more complex objects, sometimes the attribute you care about isn''t directly an attribute of the model you are working with. what is name is an attribute on the 7th element of an attribute which represent a foreign key relationship off of contact? then what? In my case, I do something like this for a normal text field: <%= text_field_tag "attribute[#{@attribute_index - 1}][att_value][page_url]", @attribute.att_value.page_url %> I have to use text_field_tag instead of text_field because I''m working with an attribute of an attribute of an attribute of my model... Anyway, can anybody give me some suggestions on how I could turn the text field generated by the above code into an auto-complete field? Also, any futher explanation on how to use "<%= field, :model, : attribute%>"-style tags with more complicated relationships would be really helpfull. thanks, Jacob -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---