views:

1006

answers:

2

In Rails how do you delete a has-many through association while retaining the formerly associated objects? Is there an ActiveRecord way to do this or I do need to write the SQL?

Also is it possible for the objects to remain friends once the relationship is gone? [ <-- lame joke attempt]

+1  A: 

Found it myself. collections.delete and just have to make sure dependents are not set to be deleted or destroyed. Somehow asking the question publicly seems to lead to me figuring the answer out in about 10 minutes on my own.

srboisvert
+1  A: 

Somehow asking the question publicly seems to lead to me figuring the answer out in about 10 minutes on my own.

That's because writing it down traverses a different neural pathway, one that apparently has other connections/associations in your mind.

Mike