I'm using the auto_complete plugin and have a simple autocomplete textfield by writing this in my controller:
class PrivateMessagesController < ApplicationController
auto_complete_for :role, :name
and this in my view:
<label for="recipient">To:</label>
<%= text_field_with_auto_complete :role, :name %>
I want to improve the autocompletion now by:
- Enabling multiple autocomplete items to be inserted in a textfield, using comma as a tokenizer
- Putting in conditions. e.g. only showing the names of certain Roles that fit a certain criteria
- Having each autocomplete item displayed in a vertical list, rather than simply separated by a space.