module ActiveRecord::Associations::ThroughAssociation
def ensure_mutable
def ensure_mutable unless source_reflection.belongs_to? if reflection.has_one? raise HasOneThroughCantAssociateThroughHasOneOrManyReflection.new(owner, reflection) else raise HasManyThroughCantAssociateThroughHasOneOrManyReflection.new(owner, reflection) end end end