public
Fork of rails/auto_complete
Description: auto_complete plugin refactored to handle complex forms and named scopes
Homepage: http://patshaughnessy.net/repeated_auto_complete
Clone URL: git://github.com/patshaughnessy/auto_complete.git
commit  0814a25a754a235c5cf6f7a258fa405059a5ca6f
tree    f2f7325741ee587d983e56ebd62cdd5c61b1c1f3
parent  7b18f05af68dec0f9e45b1a01d6b7c94e306caeb
name age message
file README Loading commit data...
file Rakefile Mon Sep 10 19:55:47 -0700 2007 Extracted auto complete macro into its own plug... [dhh]
file init.rb
directory lib/
directory test/
README
Fork of the standard auto_complete plugin to create auto complete text fields that
can be repeated more than once a single form.

A "text_field_with_auto_complete" method is made available to form_for and fields_for that:
- Insures unique id's for <input> and <div> tags
- Uses the object name from the surrounding call to form_for or fields_for so attribute
mass assignment will work as usual
- Works with the same server side controller method, auto_complete_for, as usual

See: http://patshaughnessy.net/repeated_auto_complete for details.

Example
=======

<% for person in @group.people %>
  <% auto_complete_fields_for "group[person_attributes][]", person do |person_form| %>
    <p>
      Person <%= person_form.label :name %><br/>
      <%= person_form.text_field_with_auto_complete :person, :name, {}, {:method => :get }  %> 
  <% end %>
<% end %>

Copyright (c) 2009 [Pat Shaughnessy], released under the MIT license