stipple/acts_as_archive — pull request #2 by rylwin (2012-01-30 07:48:33+00:00)
Title: Avoid ArgumentError when clearing has_many or habtm using Mysql adapter

Thanks for the work you've done on getting acts_as_archive compatible with Rails 3.1.

I hope you don't mind this pull request coming from out of the blue but I had to make a small patch for myself and wanted to share this back. This pull request is very similar to johncant's, except this one satisfies mysql.

This patch fixes an "ArgumentError: wrong number of arguments (1 for 2)" that I would get when calling clear on a habtm relationship (even when the AR model did not call acts_as_archive). For example, say a Post habtm Users, then post.users.clear (or post.users = []) would raise the ArgumentError.