I was trying to follow along on the github example
(https://github.com/crowdint/rails3-jquery-autocomplete) for building
an autocomplete and ran into a small set of problems. I'm not using
the exact names of models, but I suppose I could. It's just a dummy
set. For me: Model is Package and attribute is Brand.
I don't understand what the reference to class ProductsController <
Admin::BaseController has to do with anything relevant. Typically
Controllers inherit from ApplicationController. Why this is different
it not explained.
but once I get past this... I just did it anyways.
It doesn't do anything. There's no callbacks to the server, no
database lookups, and no visible behavior.
My form looks like:
<form accept-charset="UTF-8" action="/packages/1" class="edit_package"
type="hidden" value="✓" /><input name="_method" type="hidden"
value="put" /><input name="authenticity_token" type="hidden"
id="package_brand" name="package[brand]" size="30" type="text"
value="Puppy Chow" />
with a code reference of:
<%= form_for @package do |f| %>
<%= f.autocomplete_field :brand, autocomplete_package_brand_packages_path %>
<% end %>
autocomplete :package, :brand
Hate to do this but, "What am I doing wrong?" or "Where can I check next?"
I've tried looking for more information on examples and/or use in
Rails 3 but it's pretty lacking.
I do hope I can get some help with this - I'm under the impression
that JQuery is a bit more active and promoted than prototype and