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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060427/e21d743f/attachment.html
Hello ~ You can write your own action that responds to the autocomplete, specifying the find conditions. ~ Ben On 4/27/06, Larry White <ljw1001@gmail.com> wrote:> 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. > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Ben Reubenstein http://www.benr75.com
On Thu, 2006-04-27 at 10:13 -0400, Larry White wrote:> 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?---- only if you create your own method as opposed to using the built-in method of auto_complete Craig