From 636945b71875415c4a27f693dd76649a6dfbd8bd Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 3 Sep 2010 10:06:41 +0100 Subject: [PATCH] Add comment on association delete. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e3678eb1..d4b16d70 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,8 @@ But none of these will: >> @book.author_ids = [@solzhenistyn.id, @dostoyevsky.id] >> @book.authors = [] +Having said that, you can get the first one (`@book.authors.delete @tolstoy`) working with this [monkey patch](http://stackoverflow.com/questions/2381033/how-to-create-a-full-audit-log-in-rails-for-every-table/2381411#2381411). Many thanks to Danny Trelogan for pointing it out. + There may be a way to store authorship versions, probably using association callbacks, no matter how the collection is manipulated but I haven't found it yet. Let me know if you do.