Just hacked together something similar over the last two weeks or so.
Right now its just an ActiveRecord extension, but I approached a bit
differently. Less flexibly, but more DSLish.
I have to say I think you implementation is better in the long run as
its more flexible. Heres to good ideas!