hey,
I have a habtm relationship (assignments < assignments_candidates > candidates)
I want to be able to delete one candidate off an assignment. here is my code so far
@assignment = Assignment.find(:first,
:joins => :candidates,
:select => "assignments_candidates.*",
:conditions => ["assignments_candidates.candidate_id = ? AND assignments_candidates.assignment_id = ?",
params[:candidate_id], params[:assignment_id]]
)
@assignment.destroy
At the moment all i think this does is destroy the object not the record in the intersection table
any ideas ?
Thanks, Alex