On Fri, Jun 20, 2008 at 5:28 PM,
johnmcauley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<johnmcauley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 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?
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---