Deleting HABTM

Hi,

I've got a design which allows two objects in a HABTM, for example, an
artist and cd's; in that the artist can appear on many cds and many
cds have the artist. to make the association i've been using

@cd.artist << @artist

but i don't know how to do the opposite. how do i remove the artist
from a cd? if I attempt to simply do

@cd.artist.find(3).destroy it complains about not being able to find
an artist_id.

can anyone help?

thanks

I think i've just cracked it

@cd.artist.delete(@artist)

this seems to working nicely.

or it appears that you can

@cd.artists.clear

then i can rebuild the association again