Hi All
I wanted to add a search feature for my site and thought of using the
auto_complete text field.
The following is my table.
mysql> desc tips;
±------------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±------------±-------------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| description | text | YES | | NULL | |
| title | varchar(100) | YES | | NULL | |
±------------±-------------±-----±----±--------±---------------+
I have the following in the list.rhtml
…
.... .... <%= javascript_include_tag "prototype" %> .... .... .... .... Title: <%= text_field_with_auto_complete :tip, :title %> .... ....and I have the following in the controller “tips_controller.rb”
class TipsController < ApplicationController
auto_complete_for :tip, :title
def index
list
render :action => ‘list’
end
…
…
…
end
I see a text box appearing and also a div below it.
But i dont see anything changing.
Should I add anything else ?
Thanks
Prasanna