Question: Simple question really - how do I use `text_field_with_auto_complete` inside a `form_for` block?

I've tried doing `f.text_field_with_auto_complete` but that gives an error, and just using `text_field_with_auto_complete` by itself doesn't seem to do anything.

Am I missing something here?

Answer: 
Even within the form\_for block you ned to specify the full model because it is used to construct the Ajax callback. Also in the empty hash Ricardo listed you could pass additional options to the autocomplete field including ":token" etc.
I had this problem too, but the solution I used might not apply to you.

Since the object I was querying in the autocomplete belonged to a different model, I used a fields\_for like this, which solved the autocomplete problem.

```
<% fields_for :model, @formobject.model do %>
<p>
<%= text_field_with_auto_complete :object, :field, :skip_style => true %>
</p>
<% end %>

```

Good luck!