Hello, I am trying to get autocomplete to save record ID. I have to tables: Students and Departments. Students table has department_id field. Department table has 2 fields: id and name I set up belongs_to: and has_many: entries in the models of each. In my _form.rhtml I have the autocomplete line that is working: <%= text_field_with_auto_complete :department, :name %> ie. If I start typing, I get a pull-down like entry populated from my department table. I would like to save DEPARTMENT_ID in the student record. How to achieve it? Thanks! _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails