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: 
A couple of months back I wrote a plugin that allows you to call the "`text_field_with_auto_complete`" method directly on `fields_for` or `form_for`. The idea was to support text fields that appear more than once in a form by generating unique ids to allow the javascript to work, but it might help solve your problem also, or at least give you some new ideas.

See: <http://github.com/pat11639/repeated_auto_complete>

...and this article for details for how it works: <http://patshaughnessy.net/2008/10/31/modifying-the-autocomplete-plugin-to-allow-repeated-fields>
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.