Hi, Has anyone got any suggestions or know of any examples where people have got an autocomplete field to return the id of the row it has matched on. I have been attempting to come up with a way to do this with the aim of creating a pluign, but every method I have thought of so far seems a little over complicated, so I would appreciate any suggestions that anyone has Cheers -- 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 Dec 6, 2007, at 11:03 PM, Scott A S wrote:> Has anyone got any suggestions or know of any examples where people > have > got an autocomplete field to return the id of the row it has matched > on. > > I have been attempting to come up with a way to do this with the aim > of > creating a pluign, but every method I have thought of so far seems a > little over complicated, so I would appreciate any suggestions that > anyone hasHave you tried model_auto_completer? http://agilewebdevelopment.com/plugins/model_auto_completer -- 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 -~----------~----~----~----~------~----~------~--~---
Scott A S wrote:> Hi, > > Has anyone got any suggestions or know of any examples where people have > got an autocomplete field to return the id of the row it has matched on. > > I have been attempting to come up with a way to do this with the aim of > creating a pluign, but every method I have thought of so far seems a > little over complicated, so I would appreciate any suggestions that > anyone hasThe Scaffolding Extensions plugin [1] has a similar autocomplete field. It returns the id followed by the name of the object, and you can use to_i to get just the id. Jeremy [1] http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin -- 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 -~----------~----~----~----~------~----~------~--~---
Thanks Jeremy and Xavier, that should save me some time!! -- 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 -~----------~----~----~----~------~----~------~--~---