Autocomplete - returning id that has been matched?

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

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 has

Have you tried model_auto_completer?

http://agilewebdevelopment.com/plugins/model_auto_completer

– fxn

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 has

The 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

Thanks Jeremy and Xavier, that should save me some time!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs