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. -- 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?hl=en -~----------~----~----~----~------~----~------~--~---