Text_field_with_auto_complete

Hi,
Any one please help to me solve the problem in
text_field_with_auto_complete.

I want to call the auto_complete AJAX function only after i enter 4
characters.
To do this i have included the “min_chars” option.

My code is

<%= text_field_with_auto_complete :detail, :title, {:min_chars => 4} %>

But this is not working .

Am i doing any mistakes? Pls. help me!!!

On Tue, Sep 16, 2008 at 3:37 PM, Palani K.
[email protected] wrote:

<%= text_field_with_auto_complete :detail, :title, {:min_chars => 4} %>

The signature of the helper is

text_field_with_auto_complete(object, method, tag_options = {},
completion_options = {})

So you need to put an explicit empty tag_options this way:

<%# untested %>
<%= text_field_with_auto_complete :detail, :title, {}, :min_chars => 4
%>

Xavier N. wrote:

On Tue, Sep 16, 2008 at 3:37 PM, Palani K.
[email protected] wrote:

<%= text_field_with_auto_complete :detail, :title, {:min_chars => 4} %>

The signature of the helper is

text_field_with_auto_complete(object, method, tag_options = {},
completion_options = {})

So you need to put an explicit empty tag_options this way:

<%# untested %>
<%= text_field_with_auto_complete :detail, :title, {}, :min_chars => 4
%>

Hi Xavier N.,
It works for me .Thank you so much man thank you so much…
great work done by you…