Forum: Ruby on Rails Auto Complete in Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
27c1d5470227584808ba5d88c022e894?d=identicon&s=25 Charanya Nagarajan (charanya)
on 2009-03-16 05:16
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.
27c1d5470227584808ba5d88c022e894?d=identicon&s=25 Charanya Nagarajan (charanya)
on 2009-03-16 07:08
Charanya Nagarajan 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
This topic is locked and can not be replied to.