Hi. The call to auto_complete_for in the controller takes the model, and the field to search in that model, as arguments. But what if instead of a model, i want to search through an array located inside one of my methods in my controller, would i address it like this: auto_complete_for :method_name, :field_to search? Advice? -- 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 -~----------~----~----~----~------~----~------~--~---
On 8/22/06, Eddie Son <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hi. > > The call to auto_complete_for in the controller takes the model, and the > field to search in > that model, as arguments. But what if instead of a model, i want to > search through an array located inside one of my methods in my > controller, would i address it like this: auto_complete_for > :method_name, :field_to search? > > Advice?Take a look at the documentation on caboo.se for the auto_complete_field and associated functions. Basically, you''ll need to define an action that will return the desired entries when they are requested via XHR. Matt Jones mdj.acme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org President/Technical Director, Acme Art Company (acmeartco.org) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Matt Jones, I appriciate your looking at this. Matt Jones wrote:> On 8/22/06, Eddie Son <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> Advice? > > > > Take a look at the documentation on caboo.se for the auto_complete_field > and > associated functions. > > Basically, you''ll need to define an action that will return the desired > entries when they are requested > via XHR. > > Matt Jones > mdj.acme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > President/Technical Director, Acme Art Company (acmeartco.org)-- 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 -~----------~----~----~----~------~----~------~--~---