Plugin for Merging ActiveRecords
Posted by Lance Ivy Wed, 03 Sep 2008 20:46:00 GMT
Long long ago on a project far far away, I was anticipating an edge case that required me to actually merge database records together, along with all their associations. So I took a day and wrote this plugin. It has never seen production use in my projects, but I always refer back to it because I took the time to figure out database-powered plugin tests. And because it has a set of test models (and fixtures) that try and encompass every major combination of ActiveRecord associations (e.g. has_one/belongs_to in addition to has_many/belongs_to).
It’s been gathering dust in my personal SVN repo.
That’s not how it’s supposed to work.
Subscribe