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"
id="edit_package_1" method="post"><div
style="margin:0;padding:0;display:inline"><input name="utf8"
type="hidden" value="&#x2713;" /><input name="_method" type="hidden"
value="put" /><input name="authenticity_token" type="hidden"
value="ob80tvhunNJs2IAL1qiLdppBRNLq6hSRKASZo4f+Cr4=" /></div>
  <input data-autocomplete="/packages/autocomplete_package_brand"
id="package_brand" name="package[brand]" size="30" type="text"
value="Puppy Chow" />
</form>

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.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to