I was trying to follow along on the github example
(GitHub - crowdint/rails3-jquery-autocomplete: An easy and unobtrusive way to use jQuery's autocomplete with Rails 3) 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 toclass 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:
with a code reference of:
VIEW
<%= form_for @package do |f| %>
<%= f.autocomplete_field :brand,
autocomplete_package_brand_packages_path %>
<% end %>
and:
CONTROLLER
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
scriptalicious.