model_auto_completer provides auto completion for models. That is, the user autocompletes a text field, and the widget manages a hidden field that stores the ID of the selected model.
This fork adds the :id_prefix
option to have known IDs for both the text field and the hidden field (so they can be used via javascript or have an associated label).
It also replaces :append_random_suffix
with an improved :append_suffix
option, that not only allows for random suffixes but also for non-random suffixes.
This plugin offers three helpers and a class method for controllers. See the documentation of ModelAutoCompleterHelper.
To install this version of model_auto_completer run
script/plugin install https://github.com/dipnlik/model_auto_completer.git
In Rails 2 you need the auto_complete plugin as well:
script/plugin install auto_complete
-
© 2007-2008 ASPgems S.L.
-
© 2012 dipnlik
This code is available under the MIT license.