pepa007
2008-Jul-03 21:07 UTC
text_field_with_auto_complete only for the beginning of a string??
Hi, how do I achieve with text_field_with_auto_complete that writing ''ipsum'' in the textbox suggest also ''lorem ipsum''? so far it works for me only whent I know the first letters and type them in. like ''lo'' suggests ''lorem ipsum'' but ''ip'' suggests nothing. hopefully it''s pretty easy. thanks a lot --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2008-Jul-03 21:14 UTC
Re: text_field_with_auto_complete only for the beginning of a string??
> Hi, > > how do I achieve with text_field_with_auto_complete that writing > ''ipsum'' in the textbox suggest also ''lorem ipsum''? so far it works for > me only whent I know the first letters and type them in. like ''lo'' > suggests ''lorem ipsum'' but ''ip'' suggests nothing.You need to overwrite the method that does the auto complete searching and change it from using a SQL condition "foo%" to "%foo%". See the docs for more info. -philip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---