I have this code:
<b>Repuestos</b><br />
<% @rp_parts.each do |rp_part| %>
>
<%= rp_part.name%>
<% end %>
<% 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
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.