ActiveRecord has association callbacks for before/after add/remove that would be nice to support. This is a particularly contrived example, but I think it may make particular sense for the front for a NoSQL DB (where denormalization is more common) to support:
class Person
field :city
references_many :pets, :after_add => :inherit_city
def inherit_city(pet)
pet.city = self.city
end
end
class Pet
field :city
referenced_in :person
end
The relevant ActiveRecord code that handles this is: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/association_collection.rb