Hi. I''m using the following <%= text_field_with_auto_complete :item, :content, {:skip_style => true, :tokens => '',''} %> but it stops auto-completing after I type the first "," in the field. For example, I type "d" and let it complete to "dog", and then I type "," and another "d". It doesn''t suggest anything for the second token. I see, from the server output, that it''s sending the following ... WHERE (LOWER(content) LIKE ''%dog,d%'') ... to mysql. So, it''s not trying to isolate the material after the ",". Am I missing something here? For example, do I have to tell my controller something in addition to auto_complete_for :item, :content, :limit => 20 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
(I''m answering myself, in case it''s of benefit to someone who searches to this thread.) The problem was that I forgot an element in the hash. It works as expected when I write e.g. <%= text_field_with_auto_complete :item, :content, { :size => 60}, {:skip_style => false, :tokens => '',''} -%> (note the :size element ... I could have just put {} there also.) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
dankelley wrote:> (I''m answering myself, in case it''s of benefit to someone who searches > to this thread.) > > The problem was that I forgot an element in the hash. It works as > expected when I write e.g. > > <%= text_field_with_auto_complete :item, :content, { :size => 60}, > {:skip_style => false, :tokens => '',''} -%> > > (note the :size element ... I could have just put {} there also.)I see you also changed skip_style from true to false. Was that relevant ? Alan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Feb 5, 6:56 am, Alan Francis <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I see you also changed skip_style from true to false. Was that relevant > ?No, it has no effect except on the aesthetics. I found it looked nicer with the new setting. The key change I made was to add another field, the one with :size in it. I could have just put {} for that field, and I would still have had working tokenization. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---