Hi Guys I am building an app that has a messaging system similar to facebook. I want to use the functionality of auto_complete to select from a list of friends possible recipients. I want to be able to type a name, choose from the options, add a comma, get a new list of options from the database, and choose additional recipients, without loosing the previous selections. I could modify auto_complete_for_user_login(options = {}) to return a new selection of options from the db based only on the last part of the textfield value by stripping the text before the last comma before doing the call to get @items. However, when I make a selection the textfield value is replaced with the new user''s login. Has anyone done something like this? Regards Ivor --~--~---------~--~----~------------~-------~--~----~ 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 Nov 29, 2007, at 12:07 PM, Ivor Paul wrote:> I am building an app that has a messaging system similar to > facebook. I want to use the functionality of auto_complete to select > from a list of friends possible recipients. > > I want to be able to type a name, choose from the options, add a > comma, get a new list of options from the database, and choose > additional recipients, without loosing the previous selections. > > Has anyone done something like this?I think that''s provided by the builtin :tokens option, as shown on page 545 of the Agile. -- 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 -~----------~----~----~----~------~----~------~--~---
Thanks Xavier! I was wondering why google isn''t bringing up any results - should have gone to Agile from the start. Many many thanks - the world makes sense again :) Ivor On Nov 29, 2007 1:16 PM, Xavier Noria <fxn-xlncskNFVEJBDgjK7y7TUQ@public.gmane.org> wrote:> > On Nov 29, 2007, at 12:07 PM, Ivor Paul wrote: > > > I am building an app that has a messaging system similar to > > facebook. I want to use the functionality of auto_complete to select > > from a list of friends possible recipients. > > > > I want to be able to type a name, choose from the options, add a > > comma, get a new list of options from the database, and choose > > additional recipients, without loosing the previous selections. > > > > Has anyone done something like this? > > I think that''s provided by the builtin :tokens option, as shown on > page 545 of the Agile. > > -- 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 -~----------~----~----~----~------~----~------~--~---