title: Help with JQuery autocomplete in rails3
body: <p>I'm having difficulty setting up JQuery Autocomplete with Rails3.  I don't get any errors, it just behaves like regular text box.</p>
  
  <p>Here is what I have done:</p>
  
  <p>First I installed autocomplete as explained here:  <a href="http://github.com/crowdint/rails3-jquery-autocomplete#readme" rel="nofollow">http://github.com/crowdint/rails3-jquery-autocomplete#readme</a></p>
  
  <p>I have a model class which contains the model which will be in the lookup:</p>
  
  <pre><code>class NdbFoodDesController &lt; ApplicationController
    autocomplete :ndb_no, :long_desc
  
    ... some other functions
  end
  </code></pre>
  
  <p>Then I added the function in the routes file:</p>
  
  <pre><code>resources :ndb_food_des do
      get :autocomplete_ndb_no_long_desc, :on =&gt; :collection
    end
  </code></pre>
  
  <p>Then in the view form I have added these lines:</p>
  
  <pre><code>&lt;% f.fields_for :ingredients_recipes do |rif| %&gt;
    &lt;% javascript_include_tag "autocomplete-rails.js" %&gt;  
    &lt;td&gt;
      &lt;input type="text" autocomplete="/ndb_food_des/autocomplete_ndb_no_long_desc" id_element="#ndb_no"&gt;
    &lt;/td&gt;
    &lt;td&gt;
      &lt;%= rif.autocomplete_field :long_desc, autocomplete_ndb_no_long_desc_ndb_food_des_path %&gt;
    &lt;/td&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Is there something I'm doing wrong?</p>