method

ensure_mutable

rails latest stable - Class: ActiveRecord::Associations::ThroughAssociation
ensure_mutable()
private

No documentation available.

# File activerecord/lib/active_record/associations/through_association.rb, line 96
        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