I have this code in rp_parts controller in def destroy:
@repair_ticket.rp_parts.delete(@rp_part)
repair_tickets and rp_parts are HABTM.
If I do in the console:
repair_ticket1.rp_parts
I get: => [#<RpPart id: 1, ...">, #<RpPart id: 1,...">, #<RpPart ...">]
I only want to delete one of those RpPart id:1, and not both of them. Is it possible?