I’m attempting to implement a specific type of version control for several of my models (fundamentally different from what acts_as_versioned and vestal_versions provide). What is the best way to implement a virtual ActiveRecord model that’s driven by multiple conventional ActiveRecord models, where the model data do not exist simply as one row within one table?
In other words, how might one create an ActiveRecord model where the CRUD methods are overridden and call appropriate methods on multiple underlying ActiveRecord models?
I’d recommend the new book “Crafting Rails Applications” from the Pragmatic Programmers
http://pragprog.com/titles/jvrails/crafting-rails-applications
The second chapter does something very similar.. all that’s needed on top of that, is to
implement something similar to activerecord-3.0.3/lib/active_record/persistence.rb , which
acts as a go-between from your virtual model to the underlying persisted models.