> b = B.first # Find the b you want to remove association to. > a.bs.delete(b) > > From has_and_belongs_to_many doc: > > collection.delete(object, …) > Removes one or more objects from the collection by removing their > associations from the join table.
thanks for the reply, unfortunately this deletes ALL of them from the association table. any other ideas? thanks again, dino > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

