Auto Complete

Hello All,

The rails auto complete, text_field_with_auto_complete, compares terms using the SQL function LIKE with wildcards on with side of the keyword. Although flashy, this is pretty much useless in the greater schemesof things. For instance, I have a table with 2500 rows and this approach returns the same twenty or so no matter what keywords the user enters. Has anyone implemented an autocompletye that searches for terms alphabetically?

Regards,

john

You can write your own autocomplete action named

   auto_complete_for_#{object}_#{method}

Compute your custom completions and send back the result with

   <%= auto_complete_result @completions %>

-- fxn