Skip to content

model_auto_completer provides autocompletion for models. That is, the user autocompletes a text field, but the widget is able to manage a hidden field that stores the ID of the model that corresponds to the selected completion. This version works with Ruby 1.8.7

License

hakanai/model_auto_completer

 
 

Repository files navigation

model_auto_completer

Project description

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.

Fork description

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.

Usage

This plugin offers three helpers and a class method for controllers. See the documentation of ModelAutoCompleterHelper.

Installation

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

License

This code is available under the MIT license.

About

model_auto_completer provides autocompletion for models. That is, the user autocompletes a text field, but the widget is able to manage a hidden field that stores the ID of the model that corresponds to the selected completion. This version works with Ruby 1.8.7

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%