Forum: Ruby on Rails autocomplete question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Larry W. (Guest)
on 2006-04-27 18:13
(Received via mailing list)
I've just started using the unbelievably easy and cool auto-complete
feature.

Does anyone know if you can make it search only from the start of the
string
(or from the beginning of each word)?  By default it seems to do a
complete
search of the strings -  typing MI returns both "Mike Jones" and "Mary
Smith".

I have to believe this will be much slower as the number of recrords
increases, but even if it's not, I can't imagine anyone searching for
Mary
Smith by entering MI.  For searches of this type it would increase the
noise
that the user needs to sift through with no apparent benefit.

Is there a simple work around/mod for this?

thanks.
Ben R. (Guest)
on 2006-04-27 18:55
(Received via mailing list)
Hello ~

You can write your own action that responds to the autocomplete,
specifying the find conditions.

~ Ben

On 4/27/06, Larry W. <removed_email_address@domain.invalid> wrote:
> Smith by entering MI.  For searches of this type it would increase the noise
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>


--
Ben R.
http://www.benr75.com
Craig W. (Guest)
on 2006-04-27 19:33
(Received via mailing list)
On Thu, 2006-04-27 at 10:13 -0400, Larry W. wrote:
> Mary Smith by entering MI.  For searches of this type it would
> increase the noise that the user needs to sift through with no
> apparent benefit.
>
> Is there a simple work around/mod for this?
----
only if you create your own method as opposed to using the built-in
method of auto_complete

Craig
This topic is locked and can not be replied to.