Plugins - model_auto_completer

StarAdd to favorites

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.

Such a widget may be useful when the number of options is too much for a select. Say you need to assign a director to a movie having a database of hundreds of directors. With this plugin it is easy to let the user autocomplete by director name, and have a robust database ID managed under the hood.

ASPgems

http://model-ac.rubyforge.org/

svn://rubyforge.org/var/svn/model-ac/trunk/vendor/plugins/model_auto_completer

Rails' (MIT)

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

View Extensions

Tags

Comments

Add a comment
Serguei 5 May 2008

Well done,Xavier,thanks a lot.

Xavier Noria 31 Mar 2008

@Javier Vidal, thank you, added to the docs of 1.5.

@Wolfram, provided as a flag :appendrandomsuffix, in 1.5 as well.

Javier Vidal Postigo 31 Mar 2008

If you want modelautocompleter not to generate inline CSS, just:

<%= belongsto_autocompleter :book, :author, :fullname, {}, {}, { :skip_style => true } %>

Xavier Noria 12 Feb 2008

@Wolfram: good, I'm working on a new release and will add this feature. Thank you!

Wolfram Arnold 11 Feb 2008

This is a cool plugin. I'm missing a way to turn off the automatic suffix generation for the text field ID. This screws up the automatic insertion of a div tag for error highlighting if the field is wrong/missing (relevant only here, if :allowfreetext => true), of course.

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.
Recruiting software

Have a comment?