Autocomplete for searching using id and lists

I, I’m beginning in Rails and would like to know how to do 2 stuffs :

  1. Using autocomplete or a select combo (specially auto_complete) for
    searching data and then opening the results in the partial list (I would
    like to use that because I have a view and edit link in the list.rhtml)
  2. I would like to use auto_complete instead of a select box (since i
    have just too much data) so I would need to record the id of an object
    let’s say i have
    student : id, name
    class : id, student_id, whatever
    I would like to save the student_id in the class _form, using auto
    complete wich would load the student name, is it possible ?
    Thanks in advance !

Laura Laizer smith wrote:

I, I’m beginning in Rails and would like to know how to do 2 stuffs :

  1. Using autocomplete or a select combo (specially auto_complete) for
    searching data and then opening the results in the partial list (I would
    like to use that because I have a view and edit link in the list.rhtml)
  2. I would like to use auto_complete instead of a select box (since i
    have just too much data) so I would need to record the id of an object
    let’s say i have
    student : id, name
    class : id, student_id, whatever
    I would like to save the student_id in the class _form, using auto
    complete wich would load the student name, is it possible ?
    Thanks in advance !

I have the same problem, I think you have to do 1) passing in the
controller the fields you want …

On Apr 2, 2008, at 19:30 , Laura Laizer smith wrote:

class : id, student_id, whatever
I would like to save the student_id in the class _form, using auto
complete wich would load the student name, is it possible ?

Have a look at model_auto_completer:

http://agilewebdevelopment.com/plugins/model_auto_completer

– fxn

Disclaimer: I am the author, but I would recommend it if I wasn’t
anyway.