updating a record with select

Hello,

I have displayed a list of people and now i want to assign them a relation for example .... friend, brother,stranger,etc. the list of relations is stored with me. How can I use the select option(probably have to use onchange) so that the moment i select the relation the record of the person is updated. The name of the table from where i have to pick the relations is "relations"

Person model belongs_to :person

relation model has_many :people

show.rhtml in view <%@people.each do |person|%> <tr> <td><%=$i%></td> <td><%= link_to (image_tag(person.public_filename(:thumb)), person.public_filename) rescue nil%></td> <td><%=link_to person.title,:controller=>"person",:action=>"edit",:id=>person.id%></td> <td><%=link_to person.first_name,:controller=>"person",:action=>"edit",:id=>person.id%> <td><%=link_to person.last_name,:controller=>"person",:action=>"edit",:id=>person.id%></td> <td><%=link_to person.email1,:controller=>"person",:action=>"edit",:id=>person.id%></td> <td> select statement goes here.......what should be written here</td> <%$i = $i+1%> </tr>

Thank you.