Help with form remote tag and select name from list

I have this code:

        <b>Repuestos</b><br />
  <select name="repair_ticket[rp_item]">
   <% @rp_parts.each do |rp_part| %>
       <option value="<%= rp_part.id %>"
         <%= ' selected' if rp_part.id == @repair_ticket.rp_item %>>
         <%= rp_part.name%>
       </option>
   <% end %>
  </select></p>

  <% form_remote_tag :url => { :action => :add_to_repair, :id =>
@repair_ticket.id, :aaaa => @repair_ticket.rp_item } do %>
    <%= submit_tag "Add repair_part" %>
  <% end %>

I don't know how to send the rp_part.name from :aaaa. Is is possible
outside a form like the form in new.rhtml?

Hi John,
I was originally going to try and correct your code, but perhaps a
sample app is easier
Please download from http://www.authomedia.co.uk/dev/repairs.zip and
see how you get on. The models might not be quite what you have, but
it shows a simple RESTful controller setup with a HABTM join table and
AJAX create/destroy associations.

Should put you back on track

Joe

John Smith wrote:

Wildtangent wrote:

Hi John,
I was originally going to try and correct your code, but perhaps a
sample app is easier
Please download from http://www.authomedia.co.uk/dev/repairs.zip and
see how you get on. The models might not be quite what you have, but
it shows a simple RESTful controller setup with a HABTM join table and
AJAX create/destroy associations.

Should put you back on track

Joe

Ok, thrank you very much. I think this simple app will be very helpful
and will be the new base for my project. Anyway, does anybody know if I
can do something with my code? For now on, I only want to know it in
order to gain experience.