Topic: Help with JQuery Autocomplete with Rails3


I'm having difficulty setting up JQuery Autocomplete with Rails3. I don't get any errors, it just behaves like regular text box.

Here is what I have done:

First I installed autocomplete as explained here: … ete#readme

I have a model class which contains the model which will be in the lookup:

class NdbFoodDesController < ApplicationController
  autocomplete :ndb_no, :long_desc

  ... some other functions

Then I added the function in the routes file:

resources :ndb_food_des do
    get :autocomplete_ndb_no_long_desc, :on => :collection

Then in the view form I have added these lines:

<% f.fields_for :ingredients_recipes do |rif| %>
  <% javascript_include_tag "autocomplete-rails.js" %>  
    <input type="text" autocomplete="/ndb_food_des/autocomplete_ndb_no_long_desc" id_element="#ndb_no">
    <%= rif.autocomplete_field :long_desc, autocomplete_ndb_no_long_desc_ndb_food_des_path %>
<% end %>

Is there something I'm doing wrong?

Re: Help with JQuery Autocomplete with Rails3

we are working with a site this is a social networkting site for mothers.Before that i didnot work with any social networking site. So i m facing many difficulties in this site development.

Now, whenever i try to use any java scrpit in our home page.then our rails script and javascript will be conflict and our signup popup is not please help to find solution for this...can i want to change our signup form?