Auto Complete in Rails


#1

Hi,
I am A newbee to rails.I want to add Auto complete facility in my
application.I have installed Autocomplete plugin.And i have added the
lines

auto_complete_for :location,:name
in my controller

and in my view i have added

<%= text_field_with_auto_complete :location,:name %>

and i have got a model called Location and a table in my database called
locations with name attribute.

I am using Rails2.1.0 and when i run the application ,there is no
exception thrown.But no autocomplete takes place when i type on the text
box.

Can anyone help me on this?

Thanks in advance.


#2

Charanya N. wrote:

Hi,
I am A newbee to rails.I want to add Auto complete facility in my
application.I have installed Autocomplete plugin.And i have added the
lines

auto_complete_for :location,:name
in my controller

and in my view i have added

<%= text_field_with_auto_complete :location,:name %>

and i have got a model called Location and a table in my database called
locations with name attribute.

I am using Rails2.1.0 and when i run the application ,there is no
exception thrown.But no autocomplete takes place when i type on the text
box.

Can anyone help me on this?

Thanks in advance.

I myself found out the method

This link helped me out…

http://railsforum.com/viewtopic.php?id=23188